Dear All,
I am learning NIMBLE. I have a dependent variable (count data-number of cases named Cas in the code) and two predictors, one is a factor (named age_id ) and the other one is proportion (named Pov ). I would like to fit a GLM with NIMBLE.
Below is how I have defined model code. Note that I have included e[i], which is the expected number of cases (named ExpCas in the code).
GPmodel<-nimbleCode({
beta0 ~ dnorm(0,sd = 10000)
beta1 ~ dnorm(0,sd = 10000)
beta2 ~ dnorm(0,sd = 10000)
for(i in 1:N){
y[i] ~ dpois(mu[i])
log(mu[i]) <- beta0 + beat1*x1[i] + beta2*x2[i] + e[i]
theta[i]~dgamma(a,b)
}
a~dexp(0.1)
b~dexp(0.1)
})
GPdata<-list(y=data1$cas)
GPconsts<-list(N=168,
x1=data1$Pov,
x2=data1$age_id,
e=data1$ExpCas)
GPinits<-list(beta0=0, beta1=0, beta2=0, a=0.1 , b=0.1, theta=rep(c(1), times=GPconsts$N))
Now, the problem comes when configuring the model i.e configureMCMC( )
I get the following note, which I believe affects the output, and I haven't found a way to correct that yet.
" [Note] Additional downstream predictive nodes are also being sampled by
posterior_predictive sampler "
I also suspect I have incorrectly defined the model, but I can not trace the part.
Your help will be greatly appreciated!
Regards,
Mwandida.