Gibbs Sampling for BVAR

Use this forum for posting example programs or short bits of sample code.

Gibbs Sampling for BVAR

Postby TomDoan » Mon Sep 17, 2012 3:07 pm

The attached is an example of Gibbs sampling applied to a Bayesian VAR with a "Minnesota" prior. Unlike the calculations done using ESTIMATE, this treats the whole VAR as a unit rather than one equation at a time. This can be applied successfully to VAR's of modest size. This example has 4 variables x 4 lags (plus constant), so it has a total of 68 regression parameters. This will probably run in a reasonable time for up to perhaps 500 total parameters. The sticking point is that a full-system draw for the VAR coefficients requires taking a factor of a # of coefficients x # of coefficients matrix with no helpful structure to reduce the calculation time.

gibbsvar.rpf
Program file
(3.53 KiB) Downloaded 78 times

haversample.rat
Data file
(223 KiB) Downloaded 57 times
TomDoan
 
Posts: 2717
Joined: Wed Nov 01, 2006 5:36 pm

Return to Examples and Sample Code

Who is online

Users browsing this forum: No registered users and 1 guest

cron