mlim.mids | R Documentation |
takes "mlim" object and prepares a "mids" class for data analysis with multiple imputation.
mlim.mids(mlim, incomplete)
mlim |
array of class "mlim", returned by "mlim" function |
incomplete |
the original data.frame with NAs |
object of class 'mids', as required by 'mice' package for analyzing multiple imputation data
E. F. Haghish, based on code from 'prelim' frunction in missMDA R package
## Not run: data(iris) require(mice) irisNA <- mlim.na(iris, p = 0.1, seed = 2022) # adding unstratified NAs to all variables of a data.frame MLIM <- mlim(irisNA, m=5, tuning_time = 180, doublecheck = T, seed = 2022) # create the mids object for MICE package mids <- mlim.mids(MLIM, irisNA) # run an analysis on the mids data (just as example) fit <- with(data=mids, exp=glm(Species~ Sepal.Length, family = "binomial")) # then, pool the results! summary(pool(fit)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.