Dear All,
I try to estimate a ZIP model, that is a mixture Poisson-binomial, specifying the following model:
# ZIP
model {
for (i in 1 : N) {
muSp[i,1]<-0; muSp[i,2]<-mu
lambda[i]<-muSp[i,Index[i]]
O[i] ~ dpois(lambda[i])
Index[i] ~ dcat(theta[])
log(lambda[i]) <- log(E[i]) + alpha + h[i]
h[i] ~ dnorm(0, tau.h)
}
mu ~ dexp(0.0001); p ~ dbeta(1,1)
theta[1]<-p; theta[2]<-1-p
}
# Other priors:
alpha ~ dflat()
tau.h ~ dgamma(0.5, 0.0005)
sigma.h <- sqrt(1 / tau.h)
}
I have, however, at least one problem. When I try to ‘compile’ the model, the WinBUGS’ message is ‘Node lambda is defined more than once’.
Of course, but my question is, how I could define a equation for the mean of the Poisson part of the model (lambda)?
Thanks for any comments or ideas
Marc
Prof. Marc Saez, PhD, CStat
Research Group on Statistics,
Applied Economics and Health (GRECS)
University of Girona
Campus de Montilivi, 17071 Girona
Tel 34-972418736, Fax 34-972418032
e-mail: [log in to unmask] [log in to unmask]
http://www.udg.edu/fcee/economia/english/english.htm