Description Usage Arguments Value References Examples
Smooth relative risks from a set of expected and observed number of cases using a log-Normal model as proposed by Clayton and Kaldor (1987). There are estimated by betatilde_i =log((O_i+1/2)/E_i) in order to prevent taking the logarithm of zero.
If this case, the log-relative risks are assumed be independant and to have a normal distribution with mean \varphi and variance sigma2. Clayton y Kaldor (1987) use the EM algorithm to develop estimates of these two parameters which are used to compute the Empirical Bayes estimate of b_i. The formula is not listed here, but it can be consulted in Clayton and Kaldor (1987).
1  | lognormalEB(Observed, Expected, maxiter = 20, tol = 1e-05)
 | 
Observed | 
 Vector of observed cases.  | 
Expected | 
 Vector of expected cases.  | 
maxiter | 
 Maximum number of iterations allowed.  | 
tol | 
 Tolerance used to stop the iterative procedure.  | 
A list of four elements:
n | 
 Number of regions.  | 
phi | 
 Estimate of phi.  | 
sigma2 | 
 Estimate of sigma2.  | 
smthrr | 
 Vector of smoothed relative risks.  | 
Clayton, David and Kaldor, John (1987). Empirical Bayes Estimates of Age-standardized Relative Risks for Use in Disease Mapping. Biometrics 43, 671-681.
1 2 3 4 5 6 7 8  | 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<-lognormalEB(sids$Observed, sids$Expected)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.