Dear WinBUGS users
I have three problems when I update the following model which is used to
model the survival rate of Yellowhammer chicks from hatching to fledging
under different insecticide treatments.
1) I can use Initial(1) to update the model. However, I need to click
the UPDATE button for many times at the beginning because it cannot
sample from some t[i]. The error message is usually something like this
"cannot sample from interval censored gamma full conditional t[11]".
2) I cannot update the model when I try to run two chains by using
Initial(1) and Initial (2). Although 50 is a quite large number in
Initial (2), it is still inside the interval.
3) The only thing I am interested in is the chick survival rate from
hatching to fledging, a period which lasts for about 12~14 days. How can
I get a fitted curve (S against t) of which the interval of t is
restricted to [0, 14] by using COMPARISON tool in WinBUGS?
Could anyone help me, please?
Thank you very much for the help.
Regards,
Selina
# N: The number of chicks
# t: chick survival time (A few life lengths are known)
# tmin, tmax: chicks died between tmin & tmax
# many individuals were still alive when we finished
our observation
# Because life length of this kind of birds is 300
days in average, tmax is evaluated 300 for correspondent individuals
# S: Survival Rate
# treat: 4: >=25% foraging area is sprayed 3: <25% foraging area is sprayed
# block: there are two different areas are involved in this experiment
# b: random error
model{
for(i in 1:N){
t[i] ~ dexp(mu[i]) I(tmin[i], tmax[i])
S[i] <- exp(-mu[i]*t[i])
f[i] <- mu[i]*S[i]
log(mu[i]) <- b0 + b1[treat[i]] + b2[block[i]] + b[i]
b[i] ~ dnorm(0.0, tau)
}
b0 ~ dnorm(0.0, 0.01)
b1[1]<- 0
for(k in 2:4){
b1[k] ~ dnorm(0.0, 0.01)
}
b2[1] <- 0
b2[2] ~ dnorm(0.0, 0.01)
# uniform Prior
sigma~ dunif(0,100)
tau<-1/(sigma*sigma)
# inverse gamma prior
#tau ~ dgamma(0.01, 0.01)
#sigma <- 1 / sqrt(tau)
}
Data
list(N = 48,
t=c(NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,7,7,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,8,NA,NA,NA,NA,NA),
tmin
=c(12,12,12,12,1,5,8,12,12,12,11,11,11,12,12,12,11,11,1,4,14,12,12,11,11,11,11,6,6,1,0,0,4,4,4,4,4,4,4,12,12,12,0,9,2,5,5,12),
tmax =c(300,300,300,300,2,7,10,14,300,300,300,300,300,300,300,300,300,
300,3,6,300,300,300,300,300,300,300,300,300,3,7,7,6,6,6,6,6,6,6,300,300,300,300,300,4,8,8,300),
treat
=c(4,4,4,4,4,4,4,4,4,4,3,3,3,3,3,3,4,4,4,4,4,4,4,3,3,3,3,4,4,3,3,3,4,4,4,4,4,4,4,4,4,4,3,3,3,3,4,4),
block
=c(1,1,1,1,1,1,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,2)
)
Inits(1)
list( sigma=50,
t=c(14,14,14,14,1,5,8,14,14,14,14,14,14,14,14,14,14,14,1,4,14,14,14,14,14,14,14,6,6,1,NA,NA,4,4,4,4,4,4,4,14,14,14,NA,9,2,5,5,14)
)
Inits(2)
list( sigma=1,
t=c(50,50,50,50,1,5,8,13,50,50,50,50,50,50,50,50,50,50,1,4,50,50,50,50,50,50,50,6,6,1,NA,NA,4,4,4,4,4,4,4,50,50,50,NA,9,2,5,5,50)
)
--
----------------------------------------------------------------------
Selina Wang Phone: +44 (0)1904 462000
WEMA GTN: 5129
Central Science Laboratory Fax: +44 (0)1904 462111
Sand Hutton Email: [log in to unmask]
York YO41 1LZ Web: http://www.csl.gov.uk
----------------------------------------------------------------------
Disclaimer
The information contained in this message may include privileged,
proprietary or confidential information. Please treat it with the same
respect that you would expect for your own information. If you have
received it in error, we apologise, and ask that you contact the CSL
sender immediately and erase it from your computer. Thank you for your
co-operation.
Further information on confidentiality of our communications, can be
found at http://www.csl.gov.uk/email.htm
-------------------------------------------------------------------
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
|