| multipleSyn | R Documentation |
Generate synthetic micro datasets using a hierarchically coupled mixture model with local dependence (HCMM-LC).
multipleSyn(data_obj, model_obj, n_burnin, m, interval_btw_Syn, show_iter = TRUE)
## S3 method for class 'synMicro_object'
print(x, ...)
data_obj |
data object produced by |
model_obj |
model object produced by |
n_burnin |
size of burn-in. |
m |
number of synthetic micro datasets to be generated. |
interval_btw_Syn |
interval between MCMC iterations for generating synthetic micro datasets. |
show_iter |
logical value. If |
x |
object of class |
... |
further arguments passed to or from other methods. |
multipleSyn returns a list of the following conmponents:
synt_data |
list of |
comp_mat |
list of matrices of the mixture component indices. |
orig_data |
original dataset. |
Murray, J. S. and Reiter, J. P. (2016). Multiple imputation of missing categorical and continuous values via Bayesian mixture models with local dependence. Journal of the American Statistical Association, 111(516), pp.1466-1479.
readData, createModel, plot.synMicro_object
## preparing to generate synthetic datsets
Y_demo <- data.frame(
Sepal.Length = iris$Sepal.Length,
Sepal.Width = iris$Sepal.Width,
Petal.Length = iris$Petal.Length,
Petal.Width = iris$Petal.Width
)
X_demo <- data.frame(
Species = iris$Species
)
dat_obj <- readData(Y_input = Y_demo, X_input = X_demo)
mod_obj <- createModel(dat_obj, max_R_S_K=c(30,50,20))
## generating synthetic datasets
res_obj <- multipleSyn(dat_obj, mod_obj, n_burnin = 100, m = 5,
interval_btw_Syn = 50, show_iter = FALSE)
print(res_obj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.