Dear all,
I have a response variable (forek) that can take the values 0 or 1. This
variable contains missing data.
I want to model the processes 0 -> 1 and 1 -> 0 between time steps, t.
I select the applicable i:s by multiplying with the forek variable
(containing NA:s that are modeled) as
model{
for (i in 1:100) {
for(t in 2:7){
# The process 0 -> 1
forek[i,t] ~ dbern(eta1[i,t])
clog(eta1[i,t]) <- (Kb0*K[i,t] ) *
(1-forek[i,t-1]) #
only include i where forek was 0 in the previous time step
# The process 1 -> 0
forek[i,t] ~ dbern(eta2[i,t])
logit(eta2[i,t]) <- (Pb0 + PbD*(dbh[i]) ) *
(forek[i,t-1]) # only
include i where forek was 1 in the previous time step
}
}
<snip>
}
This gives the error message "multiple definitions of node forek[1,2]".
Does anyone know the trick of how to get around this problem?
Thanks!
/Tord
--
NOTE, new e-mail and contact information:
Tord Snäll
Department of Conservation Biology
Swedish University of Agricultural Sciences (SLU)
P.O. 7002, SE-750 07 Uppsala, Sweden
Office/Mobile/Fax
+46-18-672740/+46-730-891356/+46-18-673537
E-mail: [log in to unmask]
www.nvb.slu.se/staff_tordsnall
-------------------------------------------------------------------
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
|