I am trying to run a survival model using WINBUGS on I am new in using WINBUGS. When I run this code, there is an error while compiling the model (cursor is placed just after t.cens[]) saying expected a comma. I am not sure what may be wrong. My code is as follow:
model
{
for (i in 1:N) {
for (j in 1:M) {
# Survival times bounded below by censoring times:
t[i,j] ~ dweib(r,mu[i,j]) I(t.cens[i,j],);
log(mu[i,j]) <- alpha + beta.tb*TB[i,j] +beta.ms*MS[i,j]+beta.ws*WS[i,j]+beta.lit*LIT[i,j]+beta.ewb*EWB[i,j]+beta.bf*BF[i,j]+beta.sc*SC[i,j]+beta.shh*SHH[i,j]+beta.ar*AR[i,j]+beta.bo*BO[i,j]+beta.sdw*SDW[i,j]+z[i];
}
# Random effects:
z[i] ~ dnorm(0.0, tau)
}
# Priors:
alpha ~ dnorm(0.0, 0.0001);
beta.tb ~ dnorm(0.0, 0.0001);
#beta.reg ~ dnorm(0.0, 0.0001);
beta.ms ~ dnorm(0.0, 0.0001);
beta.ws ~ dnorm(0.0, 0.0001);
beta.lit ~ dnorm(0.0, 0.0001);
beta.ewb ~ dnorm(0.0, 0.0001);
beta.bf ~ dnorm(0.0, 0.0001);
beta.sc ~ dnorm(0.0, 0.0001);
beta.shh ~ dnorm(0.0, 0.0001);
beta.ar ~ dnorm(0.0, 0.0001);
beta.bo ~ dnorm(0.0, 0.0001);
beta.sdw ~ dnorm(0.0, 0.0001);
tau ~ dgamma(1.0E-3, 1.0E-3);
r ~ dgamma(1.0, 1.0E-3);
sigma <- 1/sqrt(tau); # s.d. of random effects
}
Data list (M=8649, N=13)
t.cens[ ] TB[ ] MS[ ] WS[ ] LIT[ ] FS[ ] EWB[ ] BF[ ] SC[ ] SHH[ ] AR[ ] BO[ ] SDW[]
36 0 0 1 1 2 1 0 2 1 2 2 1
48 0 0 1 1 2 1 0 2 1 2 2 1
24 0 0 0 1 2 3 1 1 1 2 3 1
48 0 0 0 1 2 3 1 2 1 2 2 1
24 0 1 0 1 2 3 1 2 2 2 1 1
0 0 1 0 1 1 3 1 1 2 2 1 0
0 0 0 0 1 2 3 1 2 1 2 2 1
36 0 0 0 1 2 3 1 2 1 2 2 1
36 0 0 1 1 2 3 1 2 1 2 3 1
0 0 0 1 1 2 3 1 1 1 2 2 0
36 0 0 1 1 2 3 1 1 1 2 2 0
0 0 0 0 1 1 3 1 2 1 2 1 1
12 0 1 1 1 2 3 0 1 2 2 1 1
0 0 1 1 1 2 3 0 1 2 2 1 1
24 0 0 1 1 2 1 1 2 1 2 2 1
24 0 0 0 1 2 3 1 1 2 2 3 1
48 0 0 0 1 2 3 1 1 2 2 2 1
0 0 1 1 1 2 3 1 2 1 2 1 1
24 0 1 1 1 2 3 1 2 1 2 1 1
0 0 1 0 1 2 1 1 1 1 2 2 1
36 0 1 0 1 2 1 1 2 1 2 1 1
48 0 1 0 1 2 1 1 1 1 2 1 1
12 0 1 1 0 2 1 0 2 2 2 3 1
End
I will appreciate if anyone can advise as to what am I doing wrong. Thank you.
-------------------------------------------------------------------
This list is for BUGS users to support each other, ask questions or share ideas.
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
|