R/tang_MI_RB.R
tang_MI_RB.RdInternal function, creates multiple imputed datasets based on assigned imputation method with the algorithm of Tang's sequential modeling.
tang_MI_RB(object, dtimp, treatment, method = "MAR", delta = 0,
ord_cov_dummy = FALSE, exclude_chains = NULL, include = FALSE)object inheriting from class 'remoid'
imputed complete data sets from remiod function.
treatment variable.
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".
optional. specify whether ordinal variables should be treated as
categorical variables or continuous variables when they are
included as covariates in the sequential imputation models.
Default is TRUE, dummy variables will be created accordingly.
optional vector of the index numbers of chains that should be excluded
logical, if TRUE, raw data will be included in imputed data sets with imputation ID = 0.
multiple imputed datasets stacked onto each other (i.e., long format;
optionally including the original incomplete data).
The variable Imputation_ 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.