-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade time-varying models using chunks and specifying prior parameters #171
Conversation
- Define stan function `prob_infected` in a separate script - Change models to estimate de foi by chunks rather than by year - Allow flexible specification of distribution parameters by means of `foi_location` and `foi_scale`
- Now tests for time-varying models use simulated data and chunks - The model accuracy is tested by comparing the foi used to simulate the data and the estimated foi - Files with benchmarks used with previous strategy are removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, except for the minor aesthetic in one of the stan files
inst/stan/tv_normal_log.stan
Outdated
int<lower=0> n_obs; | ||
int n_pos[n_obs]; | ||
int n_total[n_obs]; | ||
int <lower=1>age_max; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for uniformity remove the space between int and <lower=1>
i.e., int<lower=1> age_max;
NEWS.md
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
This PR:
fit_seromodel()
torstan::sampling()
via...
#118What is the current behavior? (You can also link to an open issue here)
Currently, one value of the force-of-infection is estimated for every year in the time spanned by the serosurvey.
Now chunks can be specified either by size:
or explicitly specifying the chunk structure:
Yes, two breaking changes are introduced in this PR:
chunk_size=1
, which recovers previous results.foi_location
andfoi_scale
parameters infit_seromodel
. The interpretation of these parameters may vary depending on the specified model. To recover previous results, users should use: