jomo2datlist | R Documentation |
mids
Converts a jomo data frame in long format into a list of datasets
or an object of class mids
.
jomo2datlist(jomo.dataframe, variable="Imputation")
jomo2mids(jomo.dataframe, variable="Imputation")
jomo.dataframe |
Data frame generated in jomo package |
variable |
Variable name for imputation index |
List of multiply imputed datasets
See the jomo package.
## Not run:
#############################################################################
# EXAMPLE 1: Dataset nhanes | jomo imputation and conversion into a data list
#############################################################################
data(nhanes, package="mice")
dat <- nhanes
# impute under multivariate normal model in jomo
imp1 <- jomo::jomo1con(Y=dat, nburn=100, nbetween=10, nimp=5)
# convert into a list of datasets
datlist1 <- miceadds::jomo2datlist(imp1)
# convert into mids object
datlist2 <- miceadds::jomo2datlist(imp1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.