EBpostdens | R Documentation |
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.
EBpostdens( Y, E, alpha, beta, Xrow = NULL, lower = NULL, upper = NULL, main = "" )
Y |
observed disease counts |
E |
expected disease counts |
alpha |
x |
beta |
x |
Xrow |
x |
lower |
x |
upper |
x |
main |
x |
A plot containing the gamma posterior distribution
Jon Wakefield
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.