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

prepare_serodata add_age_mean_f = FALSE #121

Closed davidsantiagoquevedo closed 1 year ago

davidsantiagoquevedo commented 1 year ago

Please place an "x" in all the boxes that apply


Hi, I was using the prepare_serodata() function setting add_age_mean_f = FALSE to avoid grouping the data by age_mean_f in the new stan models. In this case, R returns an error message. This occurs because the variable age_mean_f is not created, but it is still called out of the if sentence in line 60 dplyr::arrange(.data$age_mean_f).

data("veev2012")
veev2012t <- prepare_serodata(veev2012, add_age_mean_f = FALSE)

ntorresd commented 1 year ago

This will be addressed further by #71.