Learn R Programming

EditImputeCont (version 1.1.6)

multipleEI: Generate Multiple Edit-imputed Datasets

Description

multipleEI returns \(m\) multiple edit-imputed datasets.

Usage

multipleEI(model.obj, n.burnin, m, int.btw.EI, show.iter=TRUE)

Arguments

model.obj

Rcpp_bei model-object generated from createModel.

n.burnin

number of burn in iterations.

m

number of multiple edit-imputed datasets.

int.btw.EI

interval (number of iterations) between EI datasets.

show.iter

logical specifying if the iteration number of burning-in is displayed.

Value

array of (\(m\), \(n\), \(p\)) dimension where \(m\) is the number of edit-imputed data sets, \(n\) is the number of records and \(p\) is the number of variables.

Details

The total number of MCMC iterations is (n.burnin + m * int.btw.EI). Please see the example in the demo folder for more detailed explanation.

See Also

createModel

Examples

Run this code
# NOT RUN {
data(SimpleEx)
data1 = readData(SimpleEx$D.obs, SimpleEx$Ratio.edit, NULL, SimpleEx$Balance.edit)
# model1 = createModel(data1, 15)

## get 3 edit-imputed data from MCMC by storing every 100 iterations after 50 burn-in

# result1 = multipleEI(model1, n.burnin=50, m=3, int.btw.EI=100)

# dim(result1) 
## [1]   3 1000   4  
## m=3 Edit-imputed datasets of n=1000 records with p=4 variables
# }

Run the code above in your browser using DataLab