I'm having trouble with the following logistic regression model:
model {
for (i in 1:nex) {
logit(p[i]) <- inprod(x[i,1:nfeat], beta[1:nfeat]) + beta0
y[i] ~ dbern(p[i])
}
for (j in 1:nfeat) {
beta[j] ~ dnorm(0, 0.04)
}
beta0 ~ dnorm(0, 0.04)
}
The only thing unusual about this model is the data file: nex is 770 and
nfeat is 480 (a large number of independent variables). Each x[i,j] is
either 0 or 1, and (SUM j:: x[i,j]) is typically around 15 (that is,
most of the independent variables have value 0 for any data point).
When I tried to run this model, I kept on getting the trap message
"undefined real result," with a bunch of incomprehensible output.
Following the suggestions in the user manual, I tried reducing the
variance in the prior for beta0 beta[j], and even tried
beta[j] ~ dunif(-5, 5)
beta0 ~ dunif(-5, 5)
None of these changes got rid of the trap message.
As an extreme measure, just to see what would happen, I finally
restricted the prior as follows:
beta[j] ~ dunif(-1, 1)
beta0 ~ dunif(-1, 1)
This now ran, but VERY slowly -- about 70 seconds per iteration! I
expected this model to run slowly, because of the large number of
independent variables, but 70 seconds is ridiculous. Furthermore, I
could find no way of stopping the simulation, which was set for 1000
iterations, short of killing WinBUGS -- I couldn't get WinBUGS to
respond to anything I tried to do while it was simulating.
Any suggestions on how to make this run?
If it makes any difference, I was running WinBUGS under Windows XP,
which was running under Linux using VMWare. I allotted 220MB for the
virtual machine; WinBUGS was using about 130MB of this.
-------------------------------------------------------------------
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
|