imputeR Package — mice.impute.imputeR.lmFun" />
mice.impute.imputeR.lmFun.RdThe 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, ... )
| y | Incomplete data vector of length |
|---|---|
| ry | Vector of missing data pattern ( |
| x | Matrix ( |
| Fun | Name of imputation functions in imputeR package, e.g.,
|
| draw_boot | Logical indicating whether a Bootstrap sample is taken for sampling model parameters |
| add_noise | 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) }