pymc-devs / pymc-examples

Examples of PyMC models, including a library of Jupyter notebooks.
https://www.pymc.io/projects/examples/en/latest/
MIT License
269 stars 234 forks source link

Add Hierarchical BVAR example #456

Closed NathanielF closed 1 year ago

NathanielF commented 1 year ago

Signed-off-by: Nathaniel NathanielF@users.noreply.github.com

Example of Hierarchical Bayesian VAR model

An example adapting the PYMC labs by @ricardoV94 post on the same topic and which includes a generalisation of the functionality seen there, plus an application of the hierarchical modelling strategy to the VAR model. I will also add a discussion section on the benefits of the Bayesian approach for these kinds of model, but wanted to share this for the purposes of discussion and refinement.

@jessegrabowski has already done some amazing work on explaining VAR modeling and showing how they are a type of convolution. I see this example as building on the discussion in his work and trying to exhibit one of the key advantages of the Bayesian approach to this kind of modelling.

One thing to note is that the while my hierarchical model here samples. It is quite slow, and it'd be good to improve that somehow.

review-notebook-app[bot] commented 1 year ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

review-notebook-app[bot] commented 1 year ago

View / edit / reply to this conversation on ReviewNB

jessegrabowski commented on 2022-11-02T14:15:29Z ----------------------------------------------------------------

I don't think you need to credit me, I'd rather just help on the commit.

Also there's a typo in "fake fata".


NathanielF commented on 2022-11-02T14:19:57Z ----------------------------------------------------------------

Sure thing. Thanks