I am trying to fit a simple logistic regression of the kind:
n ~ binomial(N, theta)
theta = inv_logit( a + x * b )
x is either 0 or 1 depending if a condition is present or not. Therefor the intercept
a is directly linked to the probability
theta for condition 0.
From what I read most people recommend a non-informative normal(0,10) prior for
a, but this is always for centered data. I am modeling with
rstanarm, which is centering the data (and I think the priors as well?) internally, so I would suspect that the prior I choose should be closer to the raw data I expect and not the centered one, is this correct?
In my data, I know that I have a lot of cases where I have no observations
n in condition 0, therefor
theta tends to zero and
a would tend to
-inf. Shouldn't this be reflected by a prior which gives a higher density to
-infValues (e.g. a gamma(1,0.5) distribution (but trying it gives me the error below).
Chain 4: Rejecting initial value: Chain 4: Log probability evaluates to log(0), i.e. negative infinity. Chain 4: Stan can't start sampling from this initial value.
Summarizing the Question:
- Do I have to account for the centering of the the priors in
- If not, what would be a appropriate prior for the intercept, if
-infhas a high probability.