GIBBSVARBUILD—Gibbs sampling for Bayesian VAR

Use this forum for posting example programs or short bits of sample code.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

GIBBSVARBUILD—Gibbs sampling for Bayesian VAR

Unread post by TomDoan »

GIBBSVARBUILD.RPF does Gibbs sampling on a Bayesian VAR, using the @BVARBuildPriorMN procedure to generate the mean and precision matrices for the prior. This is a modernized version of the GIBBSVAR.RPF example.

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.

Detailed Description
Post Reply