Dear BUGS list members,
In an effort to migrate from WinBUGS to OpenBUGS, I am trying to
estimate an overdispersed poisson regression. I am
implementing this in R via R2OpenBUGS (instead of R2WinBUGS). When I
proceed in with OpenBUGS, I get the following
error message beyond my understanding:
>model is syntactically correct
>data loaded
>model compiled
>initial values loaded but chain contains uninitialized variables
>initial values loaded but chain contains uninitialized variables
>initial values loaded but chain contains uninitialized variables
>initial values generated, model initialized
>model is updating
>update error for node <epsilon[83]> algorithm log-linear rejection updater error can not sample node too many
iterations
>model is updating
>update error for node <epsilon[32]> algorithm log-linear rejection updater error can not sample node too many
iterations
>CODA files written
>no updates since DIC monitor set
When I proceed with WinBUGS instead, the model updates fine, but runs
incredibly slowly. I must be doing something wrong.
The model is straightforward (I think):
cat("
model {
for (n in 1:N){ # loop over
observations
v[n] ~ dpois(mu.v[n]); # stochastic component
log(mu.v[n]) <- inprod(beta[],X[n,]) + epsilon[n]; # PREPARE X IN R
epsilon[n] ~ dnorm(0, tau.epsilon);
}
## Non-informative priors
for (k in 1:K){
beta[k] ~ dnorm(0, .00001);
}
tau.epsilon <- pow(sigma.epsilon, -2);
sigma.epsilon ~ dunif(0,100);
}
", file="overdispPoisson.txt")
BUGS inputs:
v.data <- list ("v", "X", "N", "K")
v.inits <- function (){
list (
beta=rnorm(K),
sigma.epsilon=runif(1)
)
}
v.parameters <- c("beta", "sigma.epsilon")
When proceeding with OpenBUGS, the command is
#test ride to see program works
tmp <- bugs (v.data, v.inits, v.parameters,
"overdispPoisson.txt", n.chains=3,
n.iter=100, n.thin=10, debug=TRUE)
When proceeding with WinBUGS, the command is
#test ride to see program works
tmp <- bugs (v.data, v.inits, v.parameters,
"overdispPoisson.txt", n.chains=3,
n.iter=100, n.thin=1, debug=TRUE,
bugs.directory = "c:/Program Files (x86)/WinBUGS14/",
program = c("WinBUGS"))
Any advice will be highly appreciated. Best,
Eric Magar
Ciencia PolĂtica, ITAM
@emagar
-------------------------------------------------------------------
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
|