Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Making imputation easy

License

NotificationsYou must be signed in to change notification settings

markvanderloo/simputation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRANstatusDownloadsMentioned in Awesome Official Statistics

simputation

An R package to make imputation simple. Currently supported methods include

  • Model based (optionally add [non-]parametric random residual)
    • linear regression
    • robust linear regression (M-estimation)
    • ridge/elasticnet/lasso regression (from version >= 0.2.1)
    • CART models
    • Random forest
  • Model based, multivariate
    • Imputation based on EM-estimated parameters (from version >= 0.2.1)
    • missForest (from version >= 0.2.1)
  • Donor imputation (including various donor pool specifications)
    • k-nearest neigbour (based ongower's distance)
    • sequential hotdeck (LOCF, NOCB)
    • random hotdeck
    • Predictive mean matching
  • Other
    • (groupwise) median imputation (optional random residual)
    • Proxy imputation (copy from other variable)

Installation

To install simputation and all packages needed to support various imputationmodels do the following.

install.packages("simputation",dependencies=TRUE)

To install the development version.

git clone https://github.com/markvanderloo/simputationmake install

Example usage

Create some data suffering from missings

library(simputation)# current packagedat<-iris# empty a few fieldsdat[1:3,1]<-dat[3:7,2]<-dat[8:10,5]<-NAhead(dat,10)

Now imputeSepal.Length andSepal.Width by regression onPetal.Length andSpecies, and imputeSpecies using a CART model, that uses all other variables (including the imputed variables in this case).

dat|>  impute_lm(Sepal.Length+Sepal.Width~Petal.Length+Species)|>  impute_cart(Species~.)|># use all variables except 'Species' as predictor  head(10)

Materials

About

Making imputation easy

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors5


[8]ページ先頭

©2009-2025 Movatter.jp