Skip to contents

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 correspond to the number of FOI values to be estimated when sampling.

Usage

get_foi_index(serosurvey, group_size)

Arguments

serosurvey
survey_year

Year in which the survey took place (only needed to plot time models)

age_min

Floor value of the average between age_min and age_max

age_max

The size of the sample

sample_size

Number of samples for each age group

n_seropositive

Number of positive samples for each age group

group_size

Age groups size

Value

Integer vector with the indexes numerating each year/age (depending on the model).

Examples

data(chagas2012)
foi_index <- get_foi_index(chagas2012, group_size = 25)