Learn R Programming

mederrRank (version 0.1.0)

bayes.rank: Optimal Bayesian Ranking

Description

This function estimates the ranks of the log odds of harm of the various medication error profiles as described in Myers et al. (2011).

Usage

bayes.rank(model)

Value

bayes.rank returns the numerical vector of Optimal Bayesian ranks for the chosen mederrFit model (see the references for the details).

Arguments

model

a mederrFit object.

Author

Sergio Venturini sergio.venturini@unicatt.it,

Jessica A. Myers jmyers6@partners.org

Details

Using the posterior samples of the \(\theta_i\), the function estimates the ranks of the log odds of harm of the various error profiles. Optimal Bayesian ranking gives estimates of rank for profile \(i\) as $$\hat{R}_i = \sum_{k=1}^{n}{\hat{P}(\theta_k \leq \theta_i | \boldsymbol{y}, \boldsymbol{N})},$$ where \(\hat{P}(\theta_k \leq \theta_i | \boldsymbol{y}, \boldsymbol{N})\) is the posterior probability that \(\theta_k \leq \theta_i\).

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.

Examples

Run this code
if (FALSE) {
data("simdata", package = "mederrRank")
summary(simdata)

fit <- bhm.mcmc(simdata, nsim = 1000, burnin = 500, scale.factor = 1.1)
ranks <- bayes.rank(fit)

summary(ranks)
}

Run the code above in your browser using DataLab