Print

Print


Hi,

As promised an email to let you all know what advices I have received regarding my email yesterday.

 

As for the simple Poisson – I was advised to change the prior of the overdispersion term to a uniform distribution – instead of gamma, but that actually did not help on the convergence. So as of now, I am still not able to get a simple Poisson model including an overdispersion term to converge. As previously mentioned, if I do not include the overdispersion term the model easily converges and all my covariates are significant – but the CI’s are unrealistically narrow even for years with missing data.

As for the gamma-Poisson mixture, I did receive some advice there about reparameterizing the gamma component, but that didn’t do much for convergence, I then tried a lognormal-Poissson mixture suggested by someone here on the list, and that model actually converged very nicely – except none of my covariates were significant.

 

So although I have now gotten some of my different models to converge, I’m still quite confused as to what to do here! The count data itself is lacking detection probability, so it is highly variable – and some of the changes from year to year are biologically unfeasible and thus must be due to detectability. When I run the simple Poisson without overdispersion, the model fit may not be that good, but it reduces the extreme fluctuations between years (as opposed to the lognormal-Poisson), so I’m more inclined to use this model. My main concern here though, is the very narrow CI’s – even for years with missing data. I would appreciate any suggestions.

 

Thanks for all your help, I really appreciate it.

Lene

 

___________________________

Lene Jung Kjær

Studsdalvej 20, Taulov

7000 Fredericia, Danmark

Tlf: 29 86 96 14

email: [log in to unmask]

 

From: (The BUGS software mailing list) [mailto:[log in to unmask]] On Behalf Of Lene Jung
Sent: Wednesday, July 27, 2011 2:06 PM
To: [log in to unmask]
Subject: [BUGS] Poisson or gamma-Poisson mixture model - HELP with models!

 

Hi,

I have a question regarding some Bayesian models I’ve been running. I’m trying to model yearly count data as a function of several covariates such as temperature, snow depth, hunting etc. I have 2 different strata and am modeling the estimates separately for each strata  - it is the same model for both strata but with an adjustment term for one strata since the counts here are much lower. I’m doing it this way instead of entirely separate because the first 7 years I have no data for one strata and if modeled separately those estimates are extreme. By using a combined model the estimates are more realistic.

I’m looking at different probability distributions such as Poisson and negative binomial to model the counts. I model the negative binomial as a gamma/Poisson mixture model since I have read that the negative binomial in OpenBugs/WinBugs it not the one ecologists like to use. The problem is that when I use this model (see coding below), there is absolutely no convergence even after running the model 1,000,000 times. I have also tried to model separate rho’s for each strata with no effect. My question is whether my coding is off or wrong – I am fairly new top Bayesian statistics, so the chance of that is probably great - or that my data simply doesn’t fit a negative binomial? I have standardized all my covariates and still it doesn’t help.

As for the Poisson model – it converges fine as long as I don’t include an overdispersion term. Without overdispersion all my covariates are significant as well (CI’s not including zero) – however the CI’s are extremely narrow even for data with missing years! When I include the overdispersion term, not only do all the covariates become insignificant (CI’s including zero) the model also does not converge. The CI’s tend to look a little bit more realistic though.

 

Can anyone help me here? I’m stuck as to what to do – it seems that the Poisson model may be the better one, but with CI’s that narrow I don’t really know which one is the better model. I’ve tried calculating Bayesian p.value and MSE and the models are all quite a poor fit to the data – which I’m not all to worried about – the data itself is very poor and highly variable.

 

I really hope someone can help me out here, because I’m pretty stuck right now.

Thanks,

Lene

 

 

 

Below is the coding for both the gamma/Poisson mixture model and the Poisson model.

 

The gamma/Poisson mixture model (all the covariates except intercept and slope have been left out here in the hope of convergence – to no avail):

 

Model {                  

                               

for(k in 1:nyears){

 

in_est[k]~ dpois(lambda3_in[k])

log(lambda_in[k]) <- unit_est[k]

out_est[k]~ dpois(lambda3_out[k])

log(lambda_out[k]) <-unit_est[k]  *adjust

unit_est[k] <- B[1] + B[2]*year2[k] 

 

lambda2_in[k] <- rho[k]*lambda_in[k]

lambda2_out[k] <- rho[k]*lambda_out[k]

 

lambda3_in[k] <- max(0.000001, min(10000,lambda2_in[k]))

lambda3_out[k] <- max(0.000001, min(10000,lambda2_out[k]))

 

rho[k]~dgamma(alpha,beta)

}

               

alpha<-exp(logalpha)

logalpha~dnorm(0,0.0001)

beta~dnorm(0,0.01)

adjust~dnorm(0,0.01)

 

##priors for B's and A's

for(t in 1:2){           

                B[t]~dnorm(0,0.01)

 

}

}

 

The Poisson model with overdispersion term:

 

Model {

                               

for(k in 1:nyears){

 

in_est[k]~ dpois(lambda2_in[k])

log(lambda_in[k]) <- unit_est[k]

out_est[k]~ dpois(lambda2_out[k])

log(lambda_out[k]) <-unit_est[k]  *adjust

unit_est[k] <- B[1]+ B[2]*year2[k]  + B[3]*snow[k] + B[4]*hunt[k] + B[5]*prod[k] + err[k]

err[k]~dnorm(0,tau)

 

lambda2_in[k] <- max(0.000001, min(10000,lambda_in[k]))

lambda2_out[k] <- max(0.000001, min(10000,lambda_out[k]))

 

}              

tau~dgamma(1,0.1)

adjust~dnorm(0.01,0.01)

 

##priors for B's and A's

for(t in 1:5){           

B[t]~dnorm(0,0.01)

 

}

}

 

 

___________________________

Lene Jung Kjær

Studsdalvej 20, Taulov

7000 Fredericia, Danmark

Tlf: 29 86 96 14

email: [log in to unmask]

 

------------------------------------------------------------------- This list is for discussion of modelling issues and the BUGS software. For help with crashes and error messages, first mail [log in to unmask] To mail the BUGS list, mail to [log in to unmask] Before mailing, please check the archive at www.jiscmail.ac.uk/lists/bugs.html Please do not mail attachments to the list. To leave the BUGS list, send LEAVE BUGS to [log in to unmask] If this fails, mail [log in to unmask], NOT the whole list

------------------------------------------------------------------- This list is for discussion of modelling issues and the BUGS software. For help with crashes and error messages, first mail [log in to unmask] To mail the BUGS list, mail to [log in to unmask] Before mailing, please check the archive at www.jiscmail.ac.uk/lists/bugs.html Please do not mail attachments to the list. To leave the BUGS list, send LEAVE BUGS to [log in to unmask] If this fails, mail [log in to unmask], NOT the whole list