Learn R Programming

mi (version 0.06-5)

prior.control: Auxiliary for Adding Priors to Missing Data Imputation

Description

Auxiliary function as user interface for adding priors for mi procedure. Typically only used when calling mi.

Usage

prior.control(method=c("reshuffling", "fading"), pct.aug=10, K=1)

Arguments

method
two methods are implemented: reshuffling and fading.
pct.aug
percent of N being add into the exisitng data, where N is the number of observation of the completed data set, default is 10.
K
the cooling parameter, default is 1.

Details

If reshuffling method is used, the imputation will randomly switch between randomly imputing data from marginal (imputing data from the observed values) and drawing from the modeled based values. And with each iteration (s), the probability of cooling (q) decreases by number of iterations, such that q = K/s. If fading method is used, the imputation will augment

See Also

mi

Examples

Run this code
### NOT RUN
#===========================================================
# add fadding empirical priors by augmenting 10% of the data
#===========================================================
if(0){
 data(CHAIN)
 IMP <- mi(CHAIN, add.priors=prior.control(method="fading", pct.aug=10))
#=================================================
# add priors by randomly drawing from the marginal
#=================================================
## This is the default setting
 IMP <- mi(CHAIN, add.priors=prior.control(method="reshuffling", K=1))
#=================================================
# use no prior
#=================================================
 IMP <- mi(CHAIN, add.priors=FALSE)
}

Run the code above in your browser using DataLab