Can I use beta priors in zero inflated poisson model?

Please I have a two fold questions and I am not sure how to phrase the title of my post to capture both.

I am trying to fit a regression model in jags, and I am new Bayesian modeling.

In my model I have two variables x1 and x2 that are proportions with values between 0 and 1. In addition x2 has some missing values.

Below is my code and questions:

cat("model{
for(i in 1:N){
y[i] ~ dpois(mu[i])
mu[i]  <- lambda[i]*z[i] + 0.0001
log(lambda[i]) <- beta + beta*x1[i] + beta*x2[i] + log(offset[i])
x2[i] ~ dbeta(1,1)
z[i] ~ dbern(phi)
}
#priors
for(j in 1:3) {
beta[j] ~ dbeta(1,1)}
phi ~ dunif(0,10)
}")

My questions are:

is it proper to use beta priors as stated above in this context?

is it okay to have a normal prior for beta and beta priors for beta and beta?

If I have a variable say x4 with two categories what prior distribution should I use normal or uniform?

Edit: The x2[i] ~ dbeta(1,1) is to imput missing values. Edit2: The response variable contains quite a number of zeros which was the reason I opted for the Zero inflated approach.

• We don't set priors for data, but for parameters. What are you trying to achieve with this code?
– Tim
Jun 3 '20 at 6:44
• @Tim I missed a part in my text I will edit. for X2 there are some missing values that was why I set a prior for it. What I intend to achieve is to find the relationship between the covariates X1, X2 and the response variable Y which is number of visit to a center and the offset is the population for each region. Jun 3 '20 at 9:33

The question if some prior is "ok", or not, cannot be answered without in-depth knowledge of your data, the model, and the questions you are trying to answer with it. So if it is reasonable to assume that beta and beta can only take values between zero and one, then the prior may make sense. Notice however that beta distribution has closed support, any value below zero, or above one, is impossible according to such distribution. It will return zero densities for such values, and whatever you multiply by zero, becomes zero, so by making such choice you make it impossible for your model to find values for those parameters that fall outside unit interval. Maybe this makes sense in case of your model, maybe not, however in many cases making such hard restrictions on parameters is not the best idea.

More specifically, if x1 and x2 are proportions, then they presumably are also values between zero and one, if additionally beta and beta are values in unit integral, then 0 $$\le$$ beta*x1[i] $$\le$$ 1, and 0 $$\le$$ beta*x2[i] $$\le$$ 1, so 0 $$\le$$ beta*x1[i] + beta*x2[i] $$\le$$ 2. This means that if log(lambda[i]) needs to be greater then two, the only way for the model to achieve this is by increasing the intercept. If lambda is large, your model would predict the intercept and some "leftovers" calculated from the parameters, that would not have any significant impact on the predictions.

• thanks for the insightful comments. The idea of the model is to estimate the effect of the proportion of respondent with a certain level of education in a cluster (X1) and the proportion of respondent in each cluster that receive certain promotional items (X2) with the number of respondent in each cluster that visit the certain for recreational activities (Y). The Y is recorded as count variable while X1 and X2 are recorded as proportion in the data set. After reading your comment I am beginning to rethink my model in a different light. Jun 3 '20 at 10:49
• @ Tim rethinking my model, I decided to allow beta and beta take any values and I assigned normal priors to beta and beta, I observed that the effects are no longer significant unlike when I assigned beta priors to beta and beta and normal prior to beta. Any idea what could be responsible for this? Jun 3 '20 at 10:56
• @new_student how do you judge their significance?
– Tim
Jun 3 '20 at 10:59
• I looked at their HDI interval if it overlaps with zero or not. Jun 3 '20 at 14:28
• @new_student with beta prior the parameter can be only in (0, 1) so you force the parameter to be greater then zero. It will never overlap because this is how you defined it. Another reason why making such decisions may be a bad idea: you could force the parameters to have values that are otherwise bad in terms of the data.
– Tim
Jun 3 '20 at 14:34