I have a random variable $X$ that is Gamma distributed with unknown parameters $\alpha$ and $\beta$: $$ X\sim \text{Gamma}(\alpha, \beta) $$

I now want to estimate $\alpha$ and $\beta$ from samples $x_i$ in a Bayesian setting using STAN. What is the recommended (weakly informative) prior distribution for these parameters? In STAN $\alpha$=shape and $\beta$=inverse scale.

I read that the half-Cauchy distribution should be used for scale parameters, so is

  shape ~ cauchy(0,2.5);
  scale ~ cauchy(0,2.5);

the recommended prior for both?


2 Answers 2


Alternatively, the reference prior for the ordering $\alpha$, $\beta$ is (http://www.stats.org.uk/priors/noninformative/YangBerger1998.pdf page 13): $$ \Pi(\alpha,\beta) \propto \frac{\sqrt{\alpha PG(1,\alpha)-1}}{\sqrt{\alpha}\beta} $$ where $PG(1,x)=\sum_{i=0}^{\infty} (x+ i)^{-2}$ is the polygamma function. It results in proper posteriors.

  • 2
    $\begingroup$ Watch out, they use the location / scale parametrization but denote it with $\alpha$ and $\beta$. $\endgroup$
    – jgyou
    Feb 12, 2019 at 21:42

Half-Cauchy family was recommended instead of the inverse-gamma prior for scale parameters. Gelman (2006) recommended this because the inverse-gamma prior could be sensitive in inference problems if the variance estimates are close to zero. The density function of half-Cauchy is as follows (it only takes one parameter, $d$): $$ f(x|d) = \frac{2d}{\pi\left(d^{2} + x^{2}\right)}, \quad x>0, d>0 $$ Therefore, you can use half-Cauchy(2.5) for parameters greater than zero.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.