BUGSers:
In trying to rewrite my model using vectors and loops, per suggestions from
the list and perusal of the user's manual, I have created:
{
for (i in 1:N)
{
y[i] ~ dpois(lambda[i])
log(lambda[i]) <- log(v[i])+beta0+inprod(beta[1:23], covar[i,1:23])
covar[i,1] <- tdir[i]
covar[i,2] <- iclass[i]
covar[i,3:6] <- geo[i,1:4]
covar[i,7] <- splm1[i]
covar[i,8] <- splm2[i]
covar[i,9] <- topo[i]
covar[i,10:15] <- zone[i,1:6]
covar[i,16] <- stype[i]
covar[i,17:23] <- cont[i,1:7]
}
#priors
beta0 ~ dflat()
for (j in 1:23)
{
beta[j] ~ dnorm(0,0.001)
}
}
with data:
list(N=1031,
y=c(<data>),
v=c(<data>),
tdir=c(<data>),
iclass=c(<data>),
geo=structure(.Data=c(<data>),.Dim=c(1031,4)),
splm1=c(<data>),
splm2=c(<data>),
topo=c(<data>),
zone=structure(.Data=c(<data>),.Dim=c(1031,6)),
stype=c(<data>),
cont=structure(.Data=c(<data>),.Dim=c(1031,7))
)
and initial values:
list(beta0=1.2180,beta=c(1.2880,-2.8710,-2.9383,0.3923,-0.2077,0.4018,
-0.5510,-1.5465,-3.0913,-1.0194,1.3811,-1.0746,
-1.0800,0.4911,2.6878,0.6350,0.6852,-2.6462,1.1208,2.1358,
-0.5992,1.3127,3.2904)
)
At the compile point, I get "expected multivariate node" in the log. What
does this mean??? What might I be missing?
Thanks in advance!!!
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
|