Skip to content

shangzhi-hong/MiceMf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MiceMf

Random-forest-based Single Imputation adapted for MICE

Installation for development version from GitHub

Currently the MiceMf package is only available as source files on GitHub, any interested user can install and test the MiceMf package by running the following code in R:

if(!"remotes" %in% installed.packages()) install.packages("remotes")
remotes::install_github("shangzhi-hong/MiceMf")

Example

Using warpper function

library(MiceMf)
# Perform imputation
data("airquality")
# Get the imputed data
resCmp <- MiceMf(airquality)
resCmpNorm <- MiceMfNorm(airquality)

Using mice

library(MiceMf)
# Perform imputation
data("airquality")
impObj <- mice(airquality, method = "mf", m = 1, printFlag = FALSE)
impObjNorm <- mice(airquality, method = "mf.norm", m = 1, printFlag = FALSE)
# Get the complete data
resCmp <- complete(impObj, action = 1L)
resCmpNorm <- complete(impObjNorm, action = 1L)

MissForest-flavored imputation using MICE

library(MiceMf)
# Perform imputation
data("airquality")
impObj <- missForestMice(airquality)

About

Random-forest-based Single Imputation using MICE

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages