Solved – Jeffreys prior for inverse gamma distribution

conjugate-priorinverse gamma distributionprior

Does anybody have the experience of dealing with Jeffreys prior?

I am working with hierarchical model at the moment where the parameter
σ^2 from normal distribution is said to be chosen according to
inverse gamma distribution from Jeffreys prior.

How should it work? And why are inverse gamma distributions used
so often as the prior for variances?

I found in some presentations that I can choose Jeffreys prior as,
for example, IG(0.001,0.001)
But it looks strange cause when both alpha and beta are <1 the gamma
function behaves in a strange manner. If I try to generate values
from IG(0.001,0.001) in R with code like

a=rgamma(1000,0.001,0.001)
aa=1/a
mean(aa)

I recieve Inf value since all values of a are close to 0 and some of
them are exactly 0.

So how should one choose Jeffreys prior?

Best Answer

And why are inverse gamma distributions used so often as the prior for variances?

Because they're conjugate - at least for $\sigma^2$ in normal models.

How should it work?

You seem to have some confusion between Jeffreys' prior and (more-or-less) "uninformative" conjugate priors more generally. If you are taking a Jeffreys' prior, there's no choice involved: $p(\theta) \propto \sqrt{I(\theta)}\,$

where $I(.)$ is the Fisher information.

http://en.wikipedia.org/wiki/Jeffreys_prior