[Update: See this follow-up post.]
Here is an example of what I mean. First, a histogram of the data, consisting of a 50 individual counts. (E.g., for each of 50 subjects, the number times they checked their e-mail in the last hour.) The histogram of data has posterior-credible negative binomial distributions superimposed.
Here is the JAGS model statement:
model {
# Likelihood:
for( i in 1 : N ) {
y[i] ~ dnegbin( p , r )
}
m <- r*(1-p)/p
# Prior:
r ~ dgamma(gSh,gRa)
p ~ dbeta(1.001,1.001)
}
Although the MCMC chain comes up with reasonable estimates in the long run, there is a lot of autocorrelation along the way:
It is clear that the reason for the autocorrelation is the strong correlation of the parameters:
As I said above, there must be some well-known way to address this issue. Can someone point me to it? Thanks.