Dear BUGS Users,
I would like to ask you what should I do in case when I cannot model
data. I have already exchanged prior assumptions but still received poor
sampling, trajectories, autocorrelation, etc. Anybody can help me with
the example below? I would be so obliged for your advice. With words of
respect,
Andrzej Tukiendorf
Technical University
Opole, Poland.
[log in to unmask]
model
{for (i in 1:N) {
t[i] ~ dweib(r,mu[i]) I(t.cen[i],);
log(mu[i]) <- a[chor[i]] +b +c[met[i]]
+d*V[i]+e*nas1[i]+g*nas2[i] + m*Z[i]+n*prze[i]+o*D[i]+p*wiek[i]
}
b ~ dnorm(0.0, 0.0001);
d ~ dnorm(0.0, 0.0001);
g ~ dnorm(0.0, 0.0001);
e ~ dnorm(0.0, 0.0001);
m ~ dnorm(0.0, 0.0001);
n~ dnorm(0.0, 0.0001);
p ~ dnorm(0.0, 0.0001);
o ~ dnorm(0.0, 0.0001);
for(k in 2 : 6) {
a[k] ~ dnorm(0.0, 0.0001);
lambda.a[k] <- exp(a[k]);
}
for(l in 2 : 3) {
c[l] ~ dnorm(0.0, 0.0001);
lambda.c[l] <- exp(c[l]);
}
for (k in 1:6) { for (l in 1:3) { surv[k,l] <-
pow( log(2)/exp(a[k] +b +c[l]+d+e+g+m+n+o+p),1/r) ;}}
a[1]<- 0
c[1]<-0
lambda.d<-exp(d)
lambda.e<-exp(e)
lambda.g<-exp(g)
lambda.m<-exp(m)
lambda.n<-exp(n)
lambda.o<-exp(o)
lambda.p<-exp(p)
tau ~ dgamma(1.0E-3, 1.0E-3);
sigma <- 1/sqrt(tau);
r ~ dgamma(1.0, 1.0E-3);
}
data
list(
V=c(0.52,0.52,0.52,1.77,1.77,1.77,4.19,4.19,14.14,14.14,14.14,14.14,33.51,113.1,4.19,0.52,1.77,3.05,4.19,4.19,14.14,33.51,65.45,0.07,0.52,0.52,1.77,8.18,10.31,14.14,1.77,1.77,1.77,3.59,4.19,4.19,14.14,15.6,0.9,4.19,33.51,14.14,14.14,24.43,38.79,54.36,54.36,0.07,0.27,0.52,0.9,4.19,4.19,9.2,14.14,14.14,24.43,24.43,33.51,33.51,65.45,1.77,4.19,14.14,22.45,0.52,1.77,1.77,65.45,33.51,4.15,0.21,8.83,5.71,11.46,2.89,2.47,5.16,20.26,11.14,12.94,5.61,6.75,7.19,0.96,3.42,20.05,26.34,2.29,19.23,5.09,12.38,14.68,26.1,4.24,23.1,30.3,26.45,48.94,0.47,8.83,5.75,2.38,89.93,0.82,28.24,2.4,2.48,2.14,3.79,0.34,1.95,2.78,14.46,0.54,4,3.34,13.1,0.96,2.6,3.96,4.2,5.78,14.57,6.1,18.51,28.83,0.96,3.41,10.07,48.31,7.31,14.35,3.87,18.89,1.28,3.85,13.4,2.39,5.72,0.28,7.39,0.23,19.15,0.42,2.16,0.63,15.04,7.08,4.82,32.3,0.63,1.8,23.92,48.45),
Z=c(2,1,1,1,1,2,1,2,3,3,3,2,1,1,0,3,1,0,2,1,2,0,4,0,1,2,1,1,1,1,1,1,0,1,0,2,1,0,0,2,2,1,1,2,2,2,1,1,1,2,2,2,1,2,3,1,3,3,2,0,3,2,1,1,2,2,2,2,1,1,1,2,3,1,2,1,1,2,3,2,1,1,0,1,1,1,2,1,0,1,1,1,1,1,2,2,2,1,1,2,1,1,1,1,1,1,1,1,1,1,1,0,2,1,2,2,1,1,1,1,1,0,1,1,1,1,1,2,2,1,1,1,1,1,1,0,1,1,2,1,1,1,1,0,1,1,2,1,2,0,0,1,1,1,1),
D=c(20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,16,16,15,12,20,20,20,20,19,18,18,18,18,18,18,18,18,18,15,15,14,14,12,12,12,12,10,8,18,16,15,15,12,12,10,9,8,20,20,19,17,15,12,20,20,18,15,20,20,18,18,18,18,16,15,12,10,10,10,8,18,8,15,14,12,10,10,16,16,15,15,12,12,10,10,18,14,15,8,20,15,12,10,10),
prze=c(0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,0,1,1,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0,0,1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,1,0,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0),
N =155,t = c(
NA,21,6,13,25,43,32,14,21,1,NA,12,15,6,20,NA,133,13,15,28,NA,115,17,11,91,57,15,13,36,8,16,NA,4,26,11,4,8,9,NA,4,NA,10,9,28,5,NA,16,26,NA,NA,19,14,94,2,NA,10,3,3,8,6,6,NA,10,17,2,13,5,5,NA,9,5,7,18,18,1,21,NA,13,23,24,NA,30,NA,4,NA,NA,1,21,10,23,5,25,53,11,3,4,4,3,NA,27,6,34,20,15,33,6,6,5,56,46,28,NA,12,13,25,6,17,NA,42,NA,NA,65,56,NA,9,5,50,4,NA,28,13,NA,15,NA,NA,22,9,NA,24,95,95,15,10,38,NA,7,2,NA,57,43,NA,71,NA,35,22),
t.cen =
c(1,0,0,0,0,0,0,0,0,0,2,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,5,0,1,0,0,0,0,9,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,5,0,0,0,0,0,0,0,34,0,0,0,1,0,5,0,1,7,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,1,0,12,1,0,0,5,0,0,0,0,1,0,0,9,0,43,18,0,0,13,0,0,0,0,0,0,7,0,0,10,0,0,54,0,11,0,0),
nas1 =
c(1,1,1,1,1,1,1,1,1,1,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,57,65,51,74,70,53,35,68,59,52,51,49,69,61,54,50,42,77,63,69,47,57,72,48,54,58,43,70,60,69,69,69,58,46,61,48,60,67,56,63,56,47,65,68,54,66,56,73,63,61,53,40,72,47,47,61,54,71,60,56,48,69,49,49,71,57,64,51,41,57,64,56,69,64,54,46,59,44,81,78,45,69,51,58,57,59,45,69,51,53,62,53,61,53,60,67,60,59,58,70,36,36,65,59,59,63,41,59),
chor =
c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,5,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,1,1,2,2,2,2,2,3,3,3,3,3,3,3,3,4,4,5,5,6,6,6,6,6))
inits
list(
e=0,b=0,d=0,g=0,m=0,n=0,o=0, p=0,a=c(NA,0,0,0,0,0), c=c(NA,0,0),
r=1,tau=1)
-------------------------------------------------------------------
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
|