View source: R/fit_seromodel.R
fit_seromodel | R Documentation |
Runs specified stan model for the Force-of-Infection (FoI)
fit_seromodel(
serosurvey,
model_type = "constant",
is_log_foi = FALSE,
foi_prior = sf_normal(),
foi_sigma_rw = sf_none(),
foi_index = NULL,
foi_init = NULL,
is_seroreversion = FALSE,
seroreversion_prior = sf_normal(),
...
)
serosurvey |
|
model_type |
Type of the model. Either "constant", "age" or "time" |
is_log_foi |
Boolean to set logarithmic scale in the FoI |
foi_prior |
Force-of-infection distribution specified by means of the helper functions. Currently available options are:
|
foi_sigma_rw |
Prior distribution for the standard deviation of the Force-of-Infection. Currently available options are:
|
foi_index |
Integer vector specifying the age-groups for which Force-of-Infection values will be estimated. It can be specified by means of get_foi_index |
foi_init |
Initialization function for sampling. If null, default is chosen depending on the foi-scale of the model |
is_seroreversion |
Boolean specifying whether to include seroreversion rate estimation in the model |
seroreversion_prior |
seroreversion distribution specified by means of the helper functions. Currently available options are:
|
... |
Additional parameters for rstan |
stan_fit object with Force-of-Infection and seroreversion (when applicable) samples
data(chagas2012)
seromodel <- fit_seromodel(
serosurvey = chagas2012,
model_type = "time",
foi_index = data.frame(
year = 1935:2011,
foi_index = c(rep(1, 46), rep(2, 31))
),
iter = 100
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.