I'm trying to fit a Bayesian hierarchical poisson regression. To do so, I'm using MCMChpoisson function from MCMCpack in R. Based on this package, the model is:
$$Y_i \sim Poisson(\lambda_i)$$ $$\phi(\lambda_i) = X_i\beta + W_i \beta_i + \epsilon_i$$ $$\epsilon_i \sim N(0, \sigma^2 I_{k_i})$$ $$ \dots $$
In the model above, $\phi$ is the link function.
I skipped the rest of the model as only the parts of above are related to my question. My question is why they consider an measurement error ($\epsilon_i$) in the systematic component whereas in GLM we have a function of the mean; in other words, sampling from poisson will itself generate a measurement error.
Also, I think the extra $\epsilon_i$ term above causes me to get strange results. Does anyone know any other function/package in R to fit a model very similar to the model above with no measurement error in the systematic component.
MCMChpoisson
. $\endgroup$