handleNA: Handle Missing Values

Description Usage Arguments Details Value Author(s) References

View source: R/matchMulti-internal.R

Description

Preprocesses a dataframe of matching covariates so the Mahalanobis distance can be calculated.

Usage

1
handleNA(X, verbose = FALSE)

Arguments

X

a matrix or dataframe of covariates to be used for matching

verbose

logical value indicating whether detailed output should be provided.

Details

Preprocessing involves three main steps: (1) converting factors to matrices of dummy variables (2) for any variable with NAs, adding an additional binary variable indicating whether it is missing (3) imputing all NAs with the column mean. This follows the recommendations of Rosenbaum in section 9.4 of the referenced text.

Value

a matrix containing the preprocessed data.

Author(s)

Luke Keele, Penn State University, [email protected]

Sam Pimentel, University of Pennsylvania, [email protected]

References

Rosenbaum, Paul R. (2010). Design of Observational Studies. Springer-Verlag.


matchMulti documentation built on May 29, 2017, 9:08 a.m.