epiverse-trace / serofoi

Estimates the Force-of-Infection of a given pathogen from population based sero-prevalence studies
https://epiverse-trace.github.io/serofoi/
Other
17 stars 4 forks source link

Simplify and generalise `get_exposure_ages` #70

Closed ben18785 closed 2 months ago

ben18785 commented 1 year ago

As I understand it, get_exposure_ages just generates the ages of individuals within a serological sample. At the moment, it does the following:

But what if the data a user supplies does not have samples for all ages? Also, the requirements on the user are somewhat implicit, as the data frame needs to have columns named in a certain way. I'd propose changing this to:

create_exposure_ages <- function(birthyears, survey_year)

where birthyears is a vector of birth years.

ekamau commented 1 year ago

what if the user has data as age and not birth year ... is that step skipped? or should the user calculate birth year, externally?

ntorresd commented 2 months ago

Outdated issue.