View source: R/build_stan_data.R
get_foi_index | R Documentation |
Generates a list of integers indexing together the time/age intervals
for which FoI values will be estimated in fit_seromodel.
The max value in foi_index
corresponds to the number of FoI values to
be estimated when sampling.
The serofoi approach to fitting serological data currently supposes that FoI
is piecewise-constant across either groups of years or ages, and this
function creates a Data Frame that communicates this grouping to the
Stan model
get_foi_index(serosurvey, group_size, model_type)
serosurvey |
|
group_size |
Age groups size |
model_type |
Type of the model. Either "age" or "time" |
A Data Frame which describes the grouping of years or ages (dependent on model) into pieces within which the FoI is assumed constant when performing model fitting. A single FoI value will be estimated for ages/years assigned with the same index
data(chagas2012)
foi_index <- get_foi_index(chagas2012, group_size = 25, model_type = "time")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.