mice.impute.imputeR.lmFun.Rd
The imputation methods "imputeR.lmFun"
and "imputeR.cFun"
provide
interfaces to imputation methods in the imputeR package for
continuous and binary data, respectively.
mice.impute.imputeR.lmFun(y, ry, x, Fun=NULL, draw_boot=TRUE, add_noise=TRUE, ... )
mice.impute.imputeR.cFun(y, ry, x, Fun=NULL, draw_boot=TRUE, ... )
Incomplete data vector of length n
Vector of missing data pattern (FALSE
-- missing,
TRUE
-- observed)
Matrix (n
x p
) of complete covariates.
Name of imputation functions in imputeR package, e.g.,
imputeR::ridgeR
, see Details.
Logical indicating whether a Bootstrap sample is taken for sampling model parameters
Logical indicating whether empirical residuals should be added to predicted values
Further arguments to be passed
Methods for continuous variables:
imputeR::CubistR
,
imputeR::glmboostR
,
imputeR::lassoR
,
imputeR::pcrR
,
imputeR::plsR
,
imputeR::ridgeR
,
imputeR::stepBackR
,
imputeR::stepBothR
,
imputeR::stepForR
Methods for binary variables:
imputeR::gbmC
,
imputeR::lassoC
,
imputeR::ridgeC
,
imputeR::rpartC
,
imputeR::stepBackC
,
imputeR::stepBothC
,
imputeR::stepForC
A vector of length nmis=sum(!ry)
with imputed values.
if (FALSE) {
#############################################################################
# EXAMPLE 1: Example with binary and continuous variables
#############################################################################
library(mice)
library(imputeR)
data(nhanes, package="mice")
dat <- nhanes
dat$hyp <- as.factor(dat$hyp)
#* define imputation methods
method <- c(age="",bmi="norm",hyp="imputeR.cFun",chl="imputeR.lmFun")
Fun <- list( hyp=imputeR::ridgeC, chl=imputeR::ridgeR)
#** do imputation
imp <- mice::mice(dat1, method=method, maxit=10, m=4, Fun=Fun)
summary(imp)
}