EBpostdens: Produce plots of emprical Bayes posterior densities when the...

Description Usage Arguments Value Author(s) See Also Examples

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

1
EBpostdens(Y, E, alpha, beta, Xrow = NULL, lower = NULL, upper = NULL, main = "")

Arguments

Y

observed disease counts

E

expected disease counts

alpha
beta
Xrow
lower
upper
main

Value

A plot containing the gamma posterior distribution

Author(s)

Jon Wakefield

See Also

EBpostthresh, eBayes

Examples

1
2
3
4
5
6
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")


Search within the SpatialEpi package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.