View source: R/contact-matrix-utils.R
| impute_participant_ages | R Documentation |
Imputes participant survey data, where variables are named:
"part_age_est_min" and "part_age_est_max". Uses mean imputation, sampling
(hot deck), or leaves them as missing. These are controlled by the
estimate argument.
impute_participant_ages(
participants,
estimate = c("mean", "sample", "missing")
)
participants |
A survey data set of participants |
estimate |
if set to "mean" (default), people whose ages are given as a range (in columns named "..._est_min" and "..._est_max") but not exactly (in a column named "..._exact") will have their age set to the mid-point of the range; if set to "sample", the age will be sampled from the range; if set to "missing", age ranges will be treated as missing |
The participant data, potentially with participant ages imputed depending on
the estimate method and whether age columns are present in the data.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.