Gamma regression in Stan vs Frequentist approach

Hi!

As in the other thread, I’d suggest you change the parameterization to

\begin{align} y &\sim \text{Gamma}(\alpha,\beta) \\ \alpha &= \phi^{-1} \\ \beta &= \frac{\phi^{-1}}{\mu} \end{align}

and you also need a <lower=0> on this line

and a prior for phi (or inverse_phi if you follow my proposed parameterization).

The priors on the regression coefficients are fairly wide. Something like N(0,5) would probably be fine for the intercept, and I’d actually go for something like N(0,1) for the other coefficients since they are on the log-scale.

Also, it sometimes helps to center and scale your covariates (if you have not already done this). And if the covariates are correlated a QR decomposition might be helpful.

Cheers!
Max

Side note: This

can be simplified to the one-liner betas[2:] ~ cauchy(0,2.5); or betas[2:] ~ std_normal(); if you want to try the prior I proposed above.

Cheers!
Max

8 Likes