Prior for over-dispersion parameter in neg_binomial_2_log_lpmf

Hello,

I would like to model count data with a negative binomial, where I have a model set up with an individual-level over-dispersion parameter sigma_im for each individual i who provides count responses for each object m:

y_im ~ NegBin(mu_im, sigma_i)

I would like to put a hierarchical prior on sigma_i such that:

sigma_i ~ f(…)

so that I’m estimating an over-dispersion parameter separate per individual. From the prior choice recommendations (https://github.com/stan-dev/stan/wiki/Prior-Choice-Recommendations), the recommendation for the overdispersion parameter appears to be:

1/sqrt(sigma_i) ~ half-N(0, 1).

Is it reasonable then to model the parameters sigma_i as a positively constrained:

1/sqrt(sigma_i) ~ N(0, sigma_sigma)?

or perhaps

1/sqrt(sigma_i) ~ N(sigma_mu, sigma_sigma)?

Any suggestions would be welcome!

If you do something like that, then it is important to declare in the parameters block

parameters {
  vector<lower = 0>[J] inv_sigma;
  ...
}

and then in the transformed parameters block

transformed parameters {
  vector[K] sigma = inv(inv_sigma);
}

and then in the model block do

model {
  inv_sigma ~ normal(...);
}

Otherwise, if you make sigma a primitive parameter then you have to do a Jacobian when you put a prior on its reciprocal.