Negative Log-Posterior Function of the Bayesian Hierarchical Model for Identifying the Most Harmful Medication Errors

Share:

Description

This function computes the negative log-posterior distribution of the Bayesian hierarchical model described in Myers et al (2011). It is a helper function and not meant to be used on its own.

Usage

1
logp(theta, deltaj, sigma2, i, k, eta, dat)

Arguments

theta

value of the error profile random effect at which the log.posterior distribution is calculated.

deltaj

vector of hospital random effect values.

sigma2

scale parameter (> 0).

i

error profile index for which the calculate of the log.posterior distribution is needed.

k

degrees of freedom (> 0, maybe non-integer). df = Inf is allowed.

eta

skewness parameter (> 0).

dat

an object of class "mederrData".

Details

For further details see Myers et al. (2011).

Value

logp returns a vector of log-posterior values.

Author(s)

Sergio Venturini sergio.venturini@unibocconi.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.

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.