View source: R/naive_imputation.R
naive_imputation_step | R Documentation |
Naive imputation of earnings (and income from other family members in HH) for respondents who provided a bracket but not the actual value. This draws a value from a uniform distribution with the bounds implied by the bracket.
naive_imputation_step(df, contvars, catvars, breaks)
df |
The data frame to use. |
contvars |
Character vector of names of the continuous variables with missing values. |
catvars |
Character vector of names of categorical variables indicating the bracket. |
breaks |
The breakpoints for all the brackets. |
An updated df
including the imputations.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.