Generic function to impute ages from min/max ranges. Works for both participant and contact data by specifying the column prefix.
impute_ages(data, prefix, estimate = c("mean", "sample", "missing"))The data with ages imputed according to the specified method
A data.table containing age data
Column name prefix: "part_age" for participants, "cnt_age" for contacts
Imputation method: "mean", "sample", or "missing"