Greetings, BUGS list participants.
First of all, thanks to those who responded to my earlier query about
DIC. In retrospect, I think I always was relying on R2WinBUGS DIC
values, not the native WinBUGS one, so there probably was no change in
WinBUGS' behavior. Now I have a new issue.
I would appreciate suggestions on how to deal with poor chain mixing in
a capture-mark-recapture model with covariates (essentially a logistic
regression). Alternatively, it may be that the covariate is so useless
that there is no particular good solution for the model, but I want to
make sure before I move on.
This is an individual covariate CJS model parameterized as in Schofield,
Barker, and Mackenzie 2009. I have already made sure to center the
covariate on 0 and scale to unit variance. I have to provide boundaries
to the logit statement to prevent traps.
Otherwise, I have tried separate normal priors for the beta
coefficients, tried a multivariate normal prior for the betas, and also
tried adding extra statements to the logit portion to improve mixing;
none have worked (see code snippets below). The trace of the chains
looks like the French or Dutch flag, as each chain converges nicely but
on very different answers for the beta coefficients.
Any suggestions? It would make biological sense that the covariate is
just so unnecessary that WinBUGS can't settle on any one set of beta
coefficients, but I really want to exhaust all possibilities before
resting on that conclusion.
Thanks in advance for any ideas. I would not be surprised if my
multivariate normal priors are not specified correctly, I had not tried
that parameterization before.
cheers, Jessi Brown
### First run, normal priors
model {
for (i in 1:nind) {
for (j in first[i]+1:nyear){
# asuse and apuse are required because WinBUGS does not allow
indexing
# to begin at 0. Therefore we take a[i,j] = 0 or 1 and make it
a 1 or 2.
asuse[i,j] <- a[i,j-1] + 1
apuse[i,j] <- a[i,j] + 1
# This specifies the distribution [a|S]
a[i,j] ~ dbern(sv[asuse[i,j],i,j-1])
# This specifies the distribution [X|a,p]
y[i,j] ~ dbern(pcap[apuse[i,j],i,j])
}
for(j in first[i]:nyear-1){
# If you are dead at time j-1 then you remain dead
sv[1,i,j] <- 0
# If alive then mass- dependent survival rate
sv[2,i,j] ~ dbern(s2[2,i,j])
s2[2,i,j] <- max(0.00001, min(0.99999,s[2,i,j]))
logit(s[2,i,j]) <- beta[1] + beta[2]*resid[i]
# If dead, then you are unavailable for capture
pcap[1,i,j+1] <- 0
# If alive then constant capture probability
pcap[2,i,j+1] <- p
}
}
# prior distribution for betas and p
p ~ dbeta(1,1)
for(j in 1:2){
beta[j] ~ dnorm(0, 0.01)
}
### Next run, multivariate normal prior for betas, relevant section only
for(j in first[i]:nyear-1){
sv[1,i,j] <- 0
sv[2,i,j] ~ dbern(s2[2,i,j])
s2[2,i,j] <- max(0.00001, min(0.99999,s[2,i,j]))
logit(s[2,i,j]) <- beta[1] + beta[2]*resid[i]
pcap[1,i,j+1] <- 0
pcap[2,i,j+1] <- p
}
}
# prior distribution for betas and p
p ~ dbeta(1,1)
beta[1:2] ~ dmnorm(nu[], v1[,])
nu[1] <- -0.2
nu[2] <- 0.2
v1[1,1] <- 0.1; v1[1,2] <- 0
v1[2,1] <- 0; v1[2,2] <- 0.1
### now with logit statement expanded
for(j in first[i]:nyear-1){
sv[1,i,j] <- 0
sv[2,i,j] ~ dbern(s2[2,i,j])
s2[2,i,j] <- 1/(1+exp(-ls[2,i,j]))
ls[2,i,j] <- beta[1] + beta[2]*resid[i]
pcap[1,i,j+1] <- 0
pcap[2,i,j+1] <- p
}
}
# prior distribution for betas and p
p ~ dbeta(1,1)
for(j in 1:2){
beta[j] ~ dnorm(0, 0.01)
}
--
Jessi L. Brown
Ph.D. Candidate, Program in Ecology, Evolution, and Conservation Biology
University of Nevada, Reno
http://www.unr.edu/~jlbrown
1000 Valley Rd.
Reno, NV 89512
[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
|