This is a quote from an article by W. DuMouchel et al. 1999 "BAYESIAN DATA MINING IN LARGE FREQUENCY TABLES":
[quote]:
... to achieve the interpretability of the relative risk measures but also to adjust properly for sampling variation...Assume that each observed count Nij is a draw from a Poisson distribution with unknown mean mu[i], and that interest centers on the ratios lambda[i]= mu[i]/E[i]. But rather than treat the M values of lambda[i] as unrelated constants, assume that each lambda is drawn from a common prior distribution. This distribution is assumed be a mixture of two gamma distributions.
...the marginal distribution of each N is a mixture of negative binomial distributions; and second, the
posterior distribution of each lambda is a mixture of two gamma distributions with modified parameters:
Prob(N = n) = P f(n; a1, b1, E) + (1 P) f(n; a2, b2, E)
with f(n; a, b, E) = (1 + b/E)^-n (1 + E/b)^-a Gamma(a + n) / Gamma(a)n!
[End Quote]
I have is values of N and E. Now I have tried to perform it in winBUGS using the model below that assumes lambda is drawn from one gamma distribution (but not a mixture):
model
{
for (i in 1:K)
{
N[i]~ dpois( mu[i] )
mu[i]<- lambda[i]*E[i]
lambda[i] ~ dgamma( a, b )
}
a ~dunif(0.000001, 100)
b ~ dunif(0.000001, 100 )
}
It works OK I can have an estimate of lambdas and the parameters a and b but how can I modify my BUGS model to have lambdas drawn from the mixture of two gamma distributions like the extract above states? Thanks