bayes.rank: Optimal Bayesian Ranking

View source: R/mederrRank.R

bayes.rankR Documentation

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)

Arguments

model

a mederrFit object.

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.

Value

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

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.

Examples

## Not run: 
data("simdata", package = "mederrRank")
summary(simdata)

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

summary(ranks)

## End(Not run)

sergioventurini/mederrRank documentation built on Oct. 19, 2023, 12:40 a.m.