Learn R Programming

mederrRank (version 0.1.0)

llDiffD: Log-Likelihood Difference for the \(\delta_j\) Parameters

Description

This function computes the log-likelihood difference for the candidate \(\delta_j\) random effects. It is a helper function and not meant to be used on its own.

Usage

llDiffD(dat, deltaj, cand, thetai, gamma, tau2)

Value

llDiffD returns the vector of log-likelihood differences.

Arguments

dat

data frame containing the observed sample counts.

deltaj

vector of previous accepted values for the \(\delta_j\) random effects.

cand

vector of candidate values for the \(\delta_j\) random effects.

thetai

vector of previous accepted values for the \(\theta_i\) random effects.

gamma

last sampled value for the \(\gamma\) parameter.

tau2

last sampled value for the \(\tau^2\) parameter.

Author

Sergio Venturini sergio.venturini@unicatt.it,

Jessica A. Myers jmyers6@partners.org

Details

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

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.