Construct age-group variable from age column
get_age_intervals.Rd
Generates age intervals of length step in the interval spanned by
age_min
and age_max
in a serosurvey.
In cases where max(age_max)%%(step+1)!=0
, the last age interval is
truncated and will have a different length than the others.
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
n_sample
Number of samples for each age group
n_seropositive
Number of positive samples for each age group
- step
step used to split the age interval