View source: R/mean_impute_items.R
mean_impute_items | R Documentation |
Function to impute the mean for missing items on a per-case (row) basis if the proportion of missingness falls below a specified threshold (e.g. 0.2)
mean_impute_items(scale_df, scale_items = NULL, thresh = 0.2)
scale_df |
a data.frame object whose columns are the items to be imputed |
scale_items |
a character vector of items names the define the scale/subscale to be imputed |
thresh |
the proportion of missingness [0..1) or number [1..] of missing values below which the mean will be imputed for missing items |
If the proportion of missingness is greater than thresh
then no items will be imputed
and the observation will not be altered.
Michael Hallquist
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.