R/extract_MIdata.R
extract_MIdata.Rd
Extract a specified number of multiple imputed datasets
extract_MIdata(object, method = c("MAR", "J2R", "CR", "delta"), delta = 0,
mi.setting = NULL, M = 10, minspace = 2, mess = FALSE)
object inheriting from class 'remoid'
a method for obtaining multiple-imputed dataset. Options include
MAR
, J2R
, CR
, and delta
adjustment.
Default is MAR.
specific value used for Delta adjustment, applicable only for method="delta".
a list of arguments related to multiple imputation, including trtvar, algorithm, method, include, exclude_chains, thin, start, end, and seed.
number of imputed datasets
minimum number of iterations between iterations to be chosen as imputed values (to prevent strong correlation between imputed datasets in the case of high autocorrelation of the MCMC chains).
logical; should messages be given? Default is TRUE.
A data.frame
in which the imputed datasets are stacked onto
each other. The variable Imp_
indexes the imputation, while
.rownr
links the rows to the rows of the original data.
In cross-sectional datasets the variable .id
is added as
subject identifier.
# \donttest{
# data(schizow)
test = remiod(formula = y6 ~ tx + y0 + y1 + y3, data = schizow,
trtvar = 'tx', algorithm = 'jags', method="MAR",
ord_cov_dummy = FALSE, n.adapt = 10, n.chains = 1,
n.iter = 100, thin = 2, warn = FALSE, seed = 1234)
#> NOTE: Stopping adaptation
#>
#>
extdt = extract_MIdata(object=test, method="J2R",mi.setting=NULL, M=10, minspace=2)
# }