drawEmpirical | R Documentation |
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)
empirical_density |
A list of density objects containing the empirical density of ages for different groups. |
sex |
Numeric, the sex of the individual (1 for male, 2 for female). |
tested |
Logical, indicating whether the individual was tested (has a non-NA 'geno' value). |
sex_specific |
Logical, indicating whether the imputation should be sex-specific. Default is TRUE. |
A single age value drawn from the appropriate empirical density data.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.