Hello all !
I tried to fit a mixed treatment comparison model. I disposed of median
survival times of 4 treatments, from 3 different trials (plus 95%
confidence intervals). I assumed the logarithm of mediane survival times
followed a normal distribution.
I was surprised to obtain a negative deviance. Moreover, the residual
deviance seemed ok. Does someone has an idea of what the problem is ?
Here is the code and the results obtained for deviance and the residual
deviance.
Thanks in advance
Stéphanie Payet
REES France
Programm:
model {
for (i in 1:6) {
lMS[i] ~ dnorm(theta[i], p[i])
theta[i] <- log(log(2)) - log(lambda[i])
log(lambda[i]) <- mu[s[i]] + d[t[i]] - d[b[i]]
dev[i] <- (lMS[i] - theta[i]) * (lMS[i] - theta[i]) * p[i]
}
resdev <- sum(dev[])
for (j in 1:3) { mu[j] ~ dnorm(0,0.001) }
d[1] <- 0
for (k in 2:4) { d[k] ~ dnorm(0,0.001) }
for (i in 1:6) { mu1[i] <- mu[s[i]]*equals(t[i],1) }
for (k in 1:4) {
lMS.new[k] <- log(log(2)) - (sum(mu1[])/2 + d[k])
log(MS[k]) <- lMS.new[k]
}
}
s[] t[] lMS[] p[] b[]
1 1 4.007 137.933 1
1 2 4.200 136.601 1
2 2 3.908 228.684 2
2 3 4.140 193.826 2
3 1 4.226 429.079 1
3 4 4.383 244.607 1
END
Results:
node mean sd MC error 2.5% median 97.5% start sample
dev[1] 1.027 1.477 0.05273 0.001027 0.4643 5.349 10001 10000
dev[2] 0.9663 1.346 0.03794 0.001193 0.4438 4.811 10001 10000
dev[3] 1.006 1.485 0.04127 4.421E-4 0.4363 5.186 10001 10000
dev[4] 0.9742 1.363 0.02186 0.001181 0.4651 4.839 10001 10000
dev[5] 0.958 1.349 0.03344 8.89E-4 0.4033 4.759 10001 10000
dev[6] 1.029 1.453 0.03084 0.00183 0.4992 5.312 10001 10000
resdev 5.961 3.421 0.1182 1.188 5.352 14.17 10001 10000
deviance -15.12 3.421 0.1182 -19.89 -15.72 -6.912 10001 10000
The number of unconstrained data points is 6, which is very close to the
residual deviance.
NB : precision are very high. They were calculated using the following
formula : p = 1/var, var=(95CI/3.92)²
-------------------------------------------------------------------
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
|