View source: R/extract_MIdata.R
| extract_MIdata | R Documentation |
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 |
object inheriting from class 'remoid' |
method |
a method for obtaining multiple-imputed dataset. Options include
|
delta |
specific value used for Delta adjustment, applicable only for method="delta". |
mi.setting |
a list of arguments related to multiple imputation, including trtvar, algorithm, method, include, exclude_chains, thin, start, end, and seed. |
M |
number of imputed datasets |
minspace |
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). |
mess |
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.
# 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)
extdt = extract_MIdata(object=test, method="J2R",mi.setting=NULL, M=10, minspace=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.