ImputeCovariates: ImputeCovariates

Description Usage Arguments Value

Description

Single imputation of covariates by two methods: predictive mean matching and median imputation. Predictive mean matching (default) aggregates the variable to the child level, imputes the covariates by predictive mean matching, and expands the result to all observations per individual (strIDVariable). This method accounts for the correlations between the variables. Median imputation imputes the median imputation per individual of data frame (without correlation) of covariates in covariates vector.

Usage

1
2
ImputeCovariates(df, StudyObj, strIDVariable = "ID", method = c("pmm",
  "median"))

Arguments

df

A data.frame in which to impute missing covariate values.

StudyObj

A FAIRsimulator study object

strIDVariable

A string with the name of the columns in df containing the subject identifiers.

method

A string identifying the imputation method. Current implemented methods are method = "pmm" (default) and method = "median".

Value

A data.frame with all missing covariates imputed.


eniclas/FAIRsimulator documentation built on May 16, 2019, 5:12 a.m.