Print

Print


Greetings!

Having checked the BUGS manual and perused the BUGS FAQ/past questions
website, I haven't found an answer to my problem, this being:

Given a model where I want to model crashes as a Poisson distribution
taking both crash rate and volume into account, with various covariates
describing each site, what is the appropriate syntax?  That is,

given:  y = crash frequency at a site, lambda = crash rate at a site, and v
= volume, would I characterize the model in BUGS using y ~ Pois(lambda) or
y ~ Pois (lambda * v)?

Currently I have:

{
  for (i in 1:N)
    {
        y[i] ~ dpois(lambda[i])
        log(lambda[i]) <-

log(v[i])+beta0+beta01*tdir[i]+beta02*iclass[i]+beta03*geo1[1]
+beta04*geo2[1]+beta05*geo3[1]+beta06*geo4[1]+beta07*splm1[i]
+beta08*splm2[i]+beta09*topo[i]+beta10*zone1[i]+beta11*zone2[i]
+beta12*zone3[i]+beta13*zone4[i]+beta14*zone5[i]+beta15*zone6[i]
+beta16*stype[i]+beta17*cont1[i]+beta18*cont2[i]+beta19*cont3[i]
+beta20*cont4[i]+beta21*cont5[i]+beta22*cont6[i]+beta23*cont7[i]

      }
  #priors
  beta0 ~ dflat()
  beta01 ~ dnorm(0,1000)
  beta02 ~ dnorm(0,1000)
  beta03 ~ dnorm(0,1000)
  beta04 ~ dnorm(0,1000)
  beta05 ~ dnorm(0,1000)
  beta06 ~ dnorm(0,1000)
  beta07 ~ dnorm(0,1000)
  beta08 ~ dnorm(0,1000)
  beta09 ~ dnorm(0,1000)
  beta10 ~ dnorm(0,1000)
  beta11 ~ dnorm(0,1000)
  beta12 ~ dnorm(0,1000)
  beta13 ~ dnorm(0,1000)
  beta14 ~ dnorm(0,1000)
  beta15 ~ dnorm(0,1000)
  beta16 ~ dnorm(0,1000)
  beta17 ~ dnorm(0,1000)
  beta18 ~ dnorm(0,1000)
  beta19 ~ dnorm(0,1000)
  beta20 ~ dnorm(0,1000)
  beta21 ~ dnorm(0,1000)
  beta22 ~ dnorm(0,1000)
  beta23 ~ dnorm(0,1000)
}

with volume as an offset variable describing part of the random effects of
the crash rate.  I've gotten this to work but am uncertain of its validity.

(BTW, I am also investigating versions of this using continuous log v,
offset v, and continuous v.)

Questions:

First, is a model with y[i] ~ dpois(lambda[i] * v[i] valid?  Is it more
valid than the other???

Second, if it is valid, how would I characterize this model with, in
effect, y[i] ~ dpois(lambda[i] * v[i])?  I imagine something like:

     y[i] ~ dpois(c)
     c <- lambda[i] * v[i]
     log lambda[i] <-beta0+beta01*tdir[i]+beta02*iclass[i]+beta03*geo1[1]
+beta04*geo2[1]+beta05*geo3[1]+beta06*geo4[1]+beta07*splm1[i]
+beta08*splm2[i]+beta09*topo[i]+beta10*zone1[i]+beta11*zone2[i]
+beta12*zone3[i]+beta13*zone4[i]+beta14*zone5[i]+beta15*zone6[i]
+beta16*stype[i]+beta17*cont1[i]+beta18*cont2[i]+beta19*cont3[i]
+beta20*cont4[i]+beta21*cont5[i]+beta22*cont6[i]+beta23*cont7[i]

Your help is appreciated!!!

Thanks!

Michael

Michael Pawlovich
Traffic Safety and Crash Analysis Engineer
Iowa Department of Transportation,
  Highway Division, Engineering Bureau,
    Office of Traffic and Safety
800 Lincoln Way
Ames, Iowa  50010
P:  (515) 239-1428 / F:  (515) 239-1891
[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