Builds stan data for sampling depending on the selected model
build_stan_data(
serosurvey,
model_type = "constant",
foi_prior = sf_uniform(),
foi_index = NULL,
is_log_foi = FALSE,
foi_sigma_rw = sf_none(),
is_seroreversion = FALSE,
seroreversion_prior = sf_none()
)List with necessary data for sampling the specified model
survey_yearYear in which the survey took place (only needed to plot time models)
age_minFloor value of the average between age_min and age_max
age_maxThe size of the sample
n_sampleNumber of samples for each age group
n_seropositiveNumber of positive samples for each age group
Type of the model. Either "constant", "age" or "time"
Force-of-infection distribution specified by means of the helper functions. Currently available options are:
Function to set normal distribution priors
Function to set uniform distribution priors
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
Boolean to set logarithmic scale in the FoI
Prior distribution for the standard deviation of the Force-of-Infection. Currently available options are:
Function to set normal distribution prior. Available for time models in the log-scale
Function to set Cauchy distribution prior. Available for time models in regular scale.
Boolean specifying whether to include seroreversion rate estimation in the model
seroreversion distribution specified by means of the helper functions. Currently available options are:
Function to set normal distribution priors
Function to set uniform distribution priors
Function to set no prior distribution