This function imputes ages for unaffected individuals in a dataset based on their sex and whether they were tested, using empirical age distributions.
imputeUnaffectedAges(data, na_indices, empirical_density, max_age)
The data frame with imputed ages for unaffected individuals.
A data frame containing the individual data, including columns for age, sex, and geno.
A vector of indices indicating the rows in the data where ages need to be imputed.
A list of density objects containing the empirical density of ages for different groups.
Integer, the maximum age considered in the analysis.