donotdespair / Bayesian-Autoregressions

A collaborative repository highlighting Bayesian autoregressive analysis with extensions. It is prepared by the students of Macroeconometrics at the University of Melbourne.
https://donotdespair.github.io/Bayesian-Autoregressions/
MIT License
3 stars 14 forks source link

Inverted gamma 2 scale mixture of normal #2

Closed donotdespair closed 1 year ago

donotdespair commented 1 year ago

Hey @hanwenzhang0317

Please, provide inputs to the Inverted gamma 2 scale mixture of normal section of the doc.

Please include the following parts:

  1. State the normal-inverted gamma 2 prior as the hierarchical prior in which the scalar scale premultiplying the covariance matrix of the normal prior for vector $\boldsymbol\alpha$ follows an inverted gamma 2 distribution $$\kappa_{\boldsymbol\alpha}\sim IG2(s,\nu)$$
  2. Describe briefly a Gibbs sampler in which one step is the normal-ig2 for $\boldsymbol\alpha$ and $\sigma^2$ and the other is the ig2 for $\kappa_{\boldsymbol\alpha}$
  3. State the IG2 full conditional posterior and its parameters
  4. Present R code to sample from the ig2 distribution

Introduce the material using the notation in line with that established in section Autoregressions.

Please, create a Pull Request and include there all your commits containing contributions to this section. In your commits, please, include changes only to the index.qmd file. Could you make your submission clear, making instructive comments on the individual commits? If you're planning to introduce changes to other parts of the website, you're welcome to do that in a separate pull request. This would require you either to play with the branches to which you commit changes in GitHub Desktop, or to wait with introducing changes to other parts of the page later on, when you submit the Pull Request about your section.

hanwenzhang0317 commented 1 year ago

Hi @donotdespair,

Hope you are doing well!

Just some clarification, would the priors be:

$$ \boldsymbol\alpha | \sigma^2 \sim \mathcal{N}(\underline{\boldsymbol\alpha}, \sigma^2 \kappa{\alpha} \underline{\mathbf{V}} {\alpha}) $$

$$ \sigma^2 \sim \mathcal{IG}2(\underline{s},\underline{\nu}) , \ \kappa_{\alpha} \sim \mathcal{IG}2 (s,\nu) $$

$$ p(\boldsymbol\alpha, \sigma^2) = p(\boldsymbol\alpha | \sigma^2, \kappa{\alpha}) p(\sigma^2) p(\kappa{\alpha}) $$

hanwenzhang0317 commented 1 year ago

Hi @donotdespair,

Sorry, just a bit of correction, the first line would be

$$ \boldsymbol\alpha | \sigma^2, \kappa{\alpha} \sim N(\underline{\boldsymbol\alpha}, \sigma^2 \kappa{\alpha} \underline{V} _{\alpha}) $$

donotdespair commented 1 year ago

Hi @hanwenzhang0317

Yes, that's exactly the case!

:)

donotdespair commented 1 year ago

Hi Dear @hanwenzhang0317

Thank you for your fantastic submission 💯 ❤️ 🚀 I merged your pull request only after some minor typo corrections (it was about using bold font for matrices). This finalises your work on this part! YAY!

This was a real fun to work together on this paper :)

Greetings,

T