Negative binomial maximum likelihood for \((\beta, \alpha)\) (Newton on
\((\beta, \log\alpha)\)), posterior \(Gamma(\alpha + y, (\alpha +
E\mu)/\mu)\), its mean, median and exceedance probabilities, as
SpatialEpi::eBayes and EBpostthresh (Clayton and Kaldor 1987).
Usage
PoissonGammaEb(observed, expected, X = NULL, threshold = NULL)
Arguments
- observed, expected
Counts and expected counts.
- X
Optional covariate matrix.
- threshold
Relative-risk threshold for exceedance probabilities.
Value
List with RR, RRmed, beta, alpha, SMR and exceedance.
References
Clayton, D. and Kaldor, J. (1987). Empirical Bayes estimates
of age-standardized relative risks for use in disease mapping.
Biometrics 43, 671-681.
Examples
PoissonGammaEb(c(3, 8, 1, 12, 5, 2), c(4, 5.5, 2.5, 7, 6, 3))$alpha
#> [1] 587.2021