if (FALSE) {
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))
}
Run the code above in your browser using DataLab