empbaysmooth {DCluster}R Documentation

Empirical Bayes Smoothing

Description

Smooth relative risks from a set of expected and observed number of cases using a Poisson-Gamma model as proposed by Clayton and Kaldor (1987) .

If ν\nu and α\alpha are the two parameters of the prior Gamma distribution, smoothed relative risks are Oi+νEi+α\frac{O_i+\nu}{E_i+\alpha}.

ν\nu and α\alpha are estimated via Empirical Bayes, by using mean and variance, as described by Clayton and Kaldor(1987).

Size and probabilities for a Negative Binomial model are also calculated (see below).

See Details for more information.

Usage

empbaysmooth(Observed, Expected, maxiter=20, tol=1e-5)

Arguments

Observed

Vector of observed cases.

Expected

Vector of expected cases.

maxiter

Maximum number of iterations allowed.

tol

Tolerance used to stop the iterative procedure.

Details

The Poisson-Gamma model, as described by Clayton and Kaldor, is a two-layers Bayesian Hierarchical model:

OiθiPo(θiEi)O_i|\theta_i \sim Po(\theta_i E_i)

θiGa(ν,α)\theta_i \sim Ga(\nu, \alpha)

The posterior distribution of OiO_i,unconditioned to θi\theta_i, is Negative Binomial with size ν\nu and probability α/(α+Ei)\alpha/(\alpha+E_i).

The estimators of relative risks are θ^i=Oi+νEi+α\widehat{\theta}_i=\frac{O_i+\nu}{E_i+\alpha}. Estimators of ν\nu and α\alpha (ν^\widehat{\nu} and α^\widehat{\alpha},respectively) are calculated by means of an iterative procedure using these two equations (based on mean and variance estimations):

ν^α^=1ni=1nθ^i\frac{\widehat{\nu}}{\widehat{\alpha}}=\frac{1}{n}\sum_{i=1}^n \widehat{\theta}_i

ν^α^2=1n1i=1n(1+α^Ei)(θ^iν^α^)2\frac{\widehat{\nu}}{\widehat{\alpha}^2}=\frac{1}{n-1}\sum_{i=1}^n(1+\frac{\widehat{\alpha}}{E_i})(\widehat{\theta}_i-\frac{\widehat{\nu}}{\widehat{\alpha}})^2

Value

A list of four elements:

n

Number of regions.

nu

Estimation of parameter ν\nu

alpha

Estimation of parameter α\alpha

smthrr

Vector of smoothed relative risks.

size

Size parameter of the Negative Binomial. It is equal to

ν^\widehat{\nu}

.

prob

It is a vector of probabilities of the Negative Binomial, calculated as

α^α^+Ei\frac{\widehat{\alpha}}{\widehat{\alpha}+E_i}

.

References

Clayton, David and Kaldor, John (1987). Empirical Bayes Estimates of Age-standardized Relative Risks for Use in Disease Mapping. Biometrics 43, 671-681.

Examples

library(spdep)

data(nc.sids)

sids<-data.frame(Observed=nc.sids$SID74)
sids<-cbind(sids, Expected=nc.sids$BIR74*sum(nc.sids$SID74)/sum(nc.sids$BIR74))

smth<-empbaysmooth(sids$Observed, sids$Expected)

[Package DCluster version 0.2-10 Index]