Sims & Zha Econometrica 1999 Replication files

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

Sims & Zha Econometrica 1999 Replication files

Post by TomDoan »

The attached zip file includes most of the analysis in Sims and Zha(1999), "Error Bands for Impulse Responses", Econometrica, vol 67, no. 5, pp 1113-1156. This includes calculation of error bands using Monte Carlo integration, bootstrapping and also includes IRF's for a structural VAR. The four main program files are:
  • ymmodel.rpf. Program for the two variable Y-M model (Monte Carlo and bootstrapping)
  • bqmodel.rpf. Program for the two variable B-Q model (Monte Carlo and bootstrapping)
  • simsmodel.rpf. Analysis of the 6 variable structural VAR (parameters of model only)
  • simsirf.rpf. MC analysis of the IRF for the 6 variable structural VAR
This uses several of the new procedures such as MCGraphIRF, MCVarDoDraws and BQDoDraws.
simszhaecm1999.zip
Zip with programs/data
(18.6 KiB) Downloaded 948 times
adrats17
Posts: 1
Joined: Tue Oct 25, 2016 4:21 am

RATS programs to replicate Sims and Zha(1999) "Error Bands f

Post by adrats17 »

Hello,

I have some questions on the RATS programs https://ideas.repec.org/c/boc/bocode/rtz00145.html that were proposed to replicate the Sims and Zha (1999) "Error Bands for Impulse Responses" (I am a beginner on RATS).

I have read the paper and looked at the files. In the file "simsirf.prg", I am wondering whether the VAR model is estimated through OLS or through Bayesian estimation. What confuses me is that we compute betaols (compute betaols=%modelgetcoeffs(varmodel)) in a first step but then we compute the maximum of the log of the marginal posterior density relying on some prior for the estimation of the coefficients of the matrix of restrictions.

Does that mean that some coefficients are estimated through OLS and other through Bayesian estimation ? By reading the paper, this was really not obvious to me.

Thank you very much !
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Sims & Zha Econometrica 1999 Replication files

Post by TomDoan »

The original model is estimated by OLS, but the IRF's use (need) Monte Carlo techniques. The VAR lag coefficients can be drawn by standard techniques, but there is no simple way to draw the parameters for an overidentified contemporaneous SVAR model—you have to use Metropolis-Hastings (as is done in this example) or importance sampling. The Sims-Zha paper uses a technically simpler non-normalized model, but that produces some sign errors (as is described in the comments at the top). A normalized model (as is used in our program) requires a (weak) prior on the diagonal elements to force a proper posterior. This is covered in detail in the VAR e-course.
Post Reply