Dear All, I currently trying to model the number accidents involving motorbikes using a Poisson time series model with an AR(1) process (e.g. Hay and Pettitt 2001, biostatistics, page 433-44: Bayesian analysis of a time series of count with covariates: an application to the control of an infectious disease) model{ # model for t=1 y[1]~dpois(mu[1]) log(mu[1])<-alpha[1]+alpha[2]*x[1]+alpha[3]*xsin[1]+alpha[4]*xcos[1]+w[1] w[1]<-u[1]/sqrt(1-phi*phi) for (t in 2:n) { y[t]~dpois(mu[t]) log(mu[t])<-alpha[1]+alpha[2]*x[t]+alpha[3]*xsin[t]+alpha[4]*xcos[t]+w[t] w[t]<-phi*w[t-1]+u[t] } # priors and residuals for (t in 1:n) { u[t]~dnorm(0,tau) y.res[t]<-(y[t]-mu[t])/sqrt(mu[t]) } for (i in 1:4) { alpha[i]~dnorm(0,0.0001) } phi~dunif(-0.999,0.999) tau<-1/tauinv tauinv~dgamma(0.001,0.001) rr<-exp(alpha[2]) } The regression parameter estimates (i.e. alpha[1],alpha[2],alpha[3],alpha[4]) are very close to those obtain from a standard poisson regression (ignoring any autocorrelation) but the parameter tau has a posterior mean of about 50,000,000 with a 95% credability interval of (21.8 to 6.4E+11)! Has anyone else tried these models and have they run into similar problems? or can anybody offer an explanation as to why the variance of u[t] is so small? Best wishes Allan ========================= Dr Allan Clark Senior Lecturer in Medical Statistics University of East Anglia Norwich NR4 7TJ t: 01603 593629 ------------------------------------------------------------------- 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