p.value {mederrRank} | R Documentation |
Posterior Predictive Test statistics
Description
This function computes posterior predictive test statistics as described in Myers et al. (2011).
Usage
p.value(reps)
Arguments
reps |
list of replications created with the |
Details
For further details see Myers et al. (2011).
Value
p-value
creates a list of p-values.
Author(s)
Sergio Venturini sergio.venturini@unicatt.it,
Jessica A. Myers jmyers6@partners.org
References
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
bhm.constr.resamp
,
bhm.mcmc
,
bhm.resample
,
post.rep
.
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)
reps <- post.rep(fit2, simdata)
pvalues <- p.value(reps)
## End(Not run)
[Package mederrRank version 0.1.0 Index]