Internal 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)

Arguments

object

object inheriting from class 'remoid'

dtimp

imputed complete data sets from remiod function.

treatment

treatment variable.

method

a method for obtaining multiple-imputed dataset. Options include MAR, J2R, CR, and delta adjustment. Default is MAR.

delta

specific value used for Delta adjustment, applicable only for method="delta".

ord_cov_dummy

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.

exclude_chains

optional vector of the index numbers of chains that should be excluded

include

logical, if TRUE, raw data will be included in imputed data sets with imputation ID = 0.

Value

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.