To the many who sent me helpful answers to my issues with the Line
example, thank you. The issue turned out to be my choice of priors,
which were much more informative than I had expected.
I am now working on developing a model for an ecological time-series
(for an undergraduate senior thesis). WinBUGS does not like the model
that I specify, despite the fact that it is virtually the same as one
used by Dr. Jarle Tufto in a recent paper in the Oikos journal (the
original code is freely available at
http://www.math.ntnu.no/~jarlet/meta.bug).
The heart of the model is:
for (t in 2:N) {
Y[t] <- log((X[t])/X[t-1])
Ud[t] ~ dnorm(0,tau.d)
nu[t] <- r - alpha*(log(X[t-1]) + Ud[t]/sqrt(X[t-1])
Y[t] ~ dnorm(nu[t],tau.e)
}
Data:
list(X=c(10323.2, 11305.7 .... 4700.69), N=21)
Checking syntax on the model returns no errors, but attempting to Load
Data returns the statement "Undefined variable" with the blinking cursor
on the X variable in the Data list. Removing the references to X[] in
the definition of nu[t] allows the model to load data without issue.
Am I missing something important in the way this model is designed? At
the same time, this same structure was used by Dr. Tufto in a BUGS
model, apparently without issue, though the code apparently was written
in an older version of BUGS that included variable, constant, and data
definitions.
I can provide more detail if necessary, and look forward to hearing from
you. Thanks again.
Sincerely,
Malin Pinsky
Williams College
Williamstown, MA 01267
USA
-------------------------------------------------------------------
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
|