R: Log-Likelihood Difference for the theta_i Parameters
llDiffT
R Documentation
Log-Likelihood Difference for the θ_i Parameters
Description
This function computes the log-likelihood difference for the candidate θ_i random effects. It is a helper function and not meant to be used on its own.
Usage
llDiffT(dat, thetai, cand, deltaj, gamma, sigma2)
Arguments
dat
data frame containing the observed sample counts.
thetai
vector of previous accepted values for the θ_i random effects.
cand
vector of candidate values for the δ_j random effects.
deltaj
vector of previous accepted values for the δ_j random effects.
gamma
last sampled value for the γ parameter.
sigma2
last sampled value for the σ^2 parameter.
Details
For further details see Myers et al. (2011).
Value
llDiffT returns the vector of log-likelihood differences.
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.