2
$\begingroup$

Using Peter Hoff's book, A First Course in Bayesian Statistical Methods, I used some of my own data to fit a Hierarchical Bayesian Regression following his example. In his book, he utilized a Gibbs sampler to solve for the posterior distribution $p(\beta_1,...,\beta_m,\theta,\Sigma,\sigma^2|\mathbf{X}_1,...,\mathbf{X}_m,\boldsymbol{y}_1,...,\boldsymbol{y}_m)$ and used as the full conditional distribution for $\sigma^2$:

$\sigma^2 \sim \text{inverse-gamma}([\nu_0 + \sum n_j]/2, [\nu_0 \sigma_0 ^2 + >\text{SSR}]/2)$ where $\text{SSR} = \sum_{j=1}^{m} \sum_{i=1}^{n_j} (y_{i,j} - >\boldsymbol{\beta_j^{T}}\boldsymbol{x_{i,j}} $

I believe I ran the Gibbs sampler exactly as he outlined, using 20000 samples and discarding the first 2000 and got the following trace plot for the variance $\sigma^2$

Trace Plot for $\sigma^2$

The problem is that this does not look like an Inverse-Gamma distribution to me. Is it possible to get something that looks like this, despite drawing from an Inverse-Gamma distribution? Thanks!

$\endgroup$
2
$\begingroup$

Yes, it's possible. Here's a histogram of a sample from an (explicitly) inverse gamma random variable that looks somewhat similar to yours:

enter image description here

With a sufficiently large shape parameter it will look close to symmetric. In my case I used a shape parameter, $\alpha$ of $10^5$.

Indeed, both the moment skewness and kurtosis will approach that for a normal in the limit, and the shape looks increasingly normal; the QQ plot for the above data looks like this:

enter image description here

$\endgroup$
  • $\begingroup$ Thanks for this! Could you tell me what parameters you used to form your distribution? $\endgroup$ – TSP Jul 11 '15 at 7:30
  • $\begingroup$ I generated a gamma with shape parameter of 10^5, rate parameter 1.4x10^5 and took the inverse. I think that's equivalent to an inverse gamma with shape 10^5 and scale 1.4 x 10^5 $\endgroup$ – Glen_b Jul 11 '15 at 7:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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