This function draws ages using the inverse CDF method from empirical density data, based on sex and whether the individual was tested.
drawEmpirical(empirical_density, sex, tested, sex_specific = TRUE)
A single age value drawn from the appropriate empirical density data.
A list of density objects containing the empirical density of ages for different groups.
Numeric, the sex of the individual (1 for male, 2 for female).
Logical, indicating whether the individual was tested (has a non-NA 'geno' value).
Logical, indicating whether the imputation should be sex-specific. Default is TRUE.