EBpostdens {SpatialEpi} | R Documentation |
Produce plots of empirical Bayes posterior densities when the data Y are Poisson with expected number E and relative risk theta, with the latter having a gamma distribution with known values alpha and beta, which are estimated using empirical Bayes.
Description
This function produces plots of empirical Bayes posterior densities which are gamma distributions with parameters (alpha+Y, (alpha+E*mu)/mu) where mu = exp(x beta). The SMRs are drawn on for comparison.
Usage
EBpostdens(
Y,
E,
alpha,
beta,
Xrow = NULL,
lower = NULL,
upper = NULL,
main = ""
)
Arguments
Y |
observed disease counts |
E |
expected disease counts |
alpha |
x |
beta |
x |
Xrow |
x |
lower |
x |
upper |
x |
main |
x |
Value
A plot containing the gamma posterior distribution
Author(s)
Jon Wakefield
Examples
data(scotland)
Y <- scotland$data$cases
E <- scotland$data$expected
ebresults <- eBayes(Y,E)
EBpostdens(Y[1], E[1], ebresults$alpha, ebresults$beta, lower=0, upper=15,
main="Area 1")
[Package SpatialEpi version 1.2.8 Index]