mean_impute_items: Function to impute the mean for missing items on a per-case...

View source: R/mean_impute_items.R

mean_impute_itemsR 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)

Description

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)

Usage

mean_impute_items(scale_df, scale_items = NULL, thresh = 0.2)

Arguments

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

Details

If the proportion of missingness is greater than thresh then no items will be imputed and the observation will not be altered.

Author(s)

Michael Hallquist


PennStateDEPENdLab/dependlab documentation built on Sept. 26, 2024, 8:40 p.m.