Hierarchical Multiple Imputation

Runs single level and multilevel imputation models. The user just has to pass the data to the main function and, optionally, his analysis model. Basically the package then translates this analysis model into commands to impute the data according to it with functions from 'mice', 'MCMCglmm' or routines build for this package.


The hmi package allows user to run single level and multilevel imputation models.

The user just has to pass the data to the main function and, optionally, his analysis model. Basically the package then translates this analysis model into commands to impute the data according to it with functions from mice, MCMCglmm or routines build for this package.

As a brief example try:

example_2 <- CO2
example_2$conc <- (example_2$conc - mean(example_2$conc))/sd(example_2$conc)
#adding an intercept variable:
example_2$Intercept <- 1
 
#running the imputation:
library("hmi")
result_multi <- hmi(data = example_2, model_formula = uptake ~ 1 + conc + (1 + conc | Plant))
## [1] "We interprete Intercept as the intercept variable and set its value to 1."
## [1] "We interprete Plant as the cluster indicator and treat it as a factor."

For more details, please read the Vignette.

News

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("hmi")

0.9.17 by Matthias Speidel, a month ago


http://github.com/matthiasspeidel/hmi


Report a bug at http://github.com/matthiasspeidel/hmi/issues


Browse source code at https://github.com/cran/hmi


Authors: Matthias Speidel [aut, cre] (Munich , Germany) , Joerg Drechsler [aut] (Institute for Employment Research , Nuremberg , Germany) , Shahab Jolani [aut] (Maastricht University , Maastricht , The Netherlands)


Documentation:   PDF Manual  


Task views: Missing Data


GPL-3 license


Imports boot, coda, graphics, linLIR, lme4, MASS, Matrix, MCMCglmm, mice, msm, mvtnorm, nlme, nnet, ordinal, pbivnorm, rlang, stats, tmvtnorm, utils, VGAM

Suggests knitr, rmarkdown, testthat


See at CRAN