When to use reparameterization in gamma regression?

Hi, I am working on gamma regression in rstan and have encountered some challenges.
The model I initially use is based on the following parameterization:

y ~ gamma(mu^2/phi, mu/phi)

where mu is defined as:
mu = exp(a0 + a_ind + b + c)

However, some post suggest the following reparameterization such as here and here:
y ~ gamma(inverse_phi, inverse_phi ./ mu)

I applied both parameterizations to two different datasets. For the first dataset, the original parameterization works “better” (no divergent transitions and low BFMI issues), while for the second dataset, the alternative reparameterization performs better.

My question is:

  1. Is it acceptable to choose the parameterization that provides “better” results for a given dataset, or should I aim to use a consistent parameterization across all datasets?
  2. Are there any considerations I should be aware of when deciding between these parameterizations?

Thank you!

Yes. You just want to make sure the models have the same posterior. We do this all the time with things like centered vs. non-centered parameterization—the former works well for large data sets and the latter for tiny ones.

You just have to be careful to apply change-of-variables corrections to make sure you’re fitting the same model. For instance, you want to give inverse_phi a prior that matches the prior for phi after inverting (and hence requires the same kind of Jacobian correction as lognormal or inverse gamma).