bhm.resample {mederrRank} | R Documentation |
Resampling Transformation for the Markov Chain Monte Carlo Estimation Simulation of the Bayesian Hierarchical Model for Identifying the Most Harmful Medication Errors
Description
This function implements the transformation needed to apply the importance link function resampling methodology based on the Markov Chain Monte Carlo simulations obtained with the bhm.mcmc
command (see the References).
Usage
bhm.resample(model, dat, p.resample = 0.1, k, eta)
Arguments
model |
|
dat |
an object of class "mederrData". |
p.resample |
proportion of simulations resampled from the |
k |
required vector of |
eta |
required vector of |
Value
bhm.resample
returns an object of the class "mederrResample".
Author(s)
Sergio Venturini sergio.venturini@unicatt.it,
Jessica A. Myers jmyers6@partners.org
References
MacEachern, S. and Peruggia, M. (2000), "Importance Link Function Estimation for Markov Chain Monte Carlo Methods", Journal of Computational and Graphical Statistics, 9, 99-121.
Myers, J. A., Venturini, S., Dominici, F. and Morlock, L. (2011), "Random Effects Models for Identifying the Most Harmful Medication Errors in a Large, Voluntary Reporting Database". Technical Report.
See Also
mederrData
,
mederrFit
,
bhm.mcmc
.
Examples
## Not run:
data("simdata", package = "mederrRank")
summary(simdata)
fit <- bhm.mcmc(simdata, nsim = 1000, burnin = 500, scale.factor = 1.1)
resamp <- bhm.resample(fit, simdata, p.resample = .1,
k = c(3, 6, 10, 30, 60, Inf), eta = c(.5, .8, 1, 1.25, 2))
fit2 <- bhm.constr.resamp(fit, resamp, k = 3, eta = .8)
plot(fit, fit2, simdata)
theta0 <- c(10, 6, 100, 100, .1)
ans <- mixnegbinom.em(simdata, theta0, 50000, 0.01, se = TRUE,
stratified = TRUE)
summary(fit2, ans, simdata)
## End(Not run)