Historical Decomposition & Counterfactual Simulation

Questions and discussions on Vector Autoregressions
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Historical Decomposition & Counterfactual Simulation

Unread post by TomDoan »

The attached is a chapter out of the VAR workbook, describing historical decomposition in greater detail than in the RATS manual, and also showing how to generalize the analysis to other forms of counterfactual simulation.
Historical Decomposition chapter from VAR Workbook.pdf
(237.94 KiB) Downloaded 2700 times
If you're interested in ordering the full workbook with examples, see

https://www.estima.com/shopcart/weborde ... rses.shtml
luching
Posts: 64
Joined: Mon Jun 07, 2010 4:05 pm

Re: Historical Decomposition & Counterfactual Simulation

Unread post by luching »

Is there a sample code that does forecasts using the path option? I am trying to apply this to do counterfactuals on VAR's with sign restrictions. I think if I can map back and forth between structural and reduced form error terms, this should be straightforward using the PATH option in FORECAST. Please let me know.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Historical Decomposition & Counterfactual Simulation

Unread post by TomDoan »

One of the example programs in http://www.estima.com/procs_perl/700/uhligjme2005.zip is called Uhlig2 with history.prg. That's probably quite close to what you want. There's also a thread in the forum at http://www.estima.com/forum/viewtopic.php?f=4&t=307.
luching
Posts: 64
Joined: Mon Jun 07, 2010 4:05 pm

Re: Historical Decomposition & Counterfactual Simulation

Unread post by luching »

Hi Tom,

Mine is the basic setup where only one shock is identified. Despite this, say in a 4 variables VAR, there are other shocks, whether or not we identify them. My question is this:

The "base" forecasts are the dynamic forecasts with all shocks shut down. Does the "baseline" forecasts only add the "structural" shock IDENTIFIED. Or, does it add all shocks? I am interested in the former. The way I have in mind is to back out the structural error terms, set the one identified to zero during the period we want to run counterfactuals and then map it back to reduced form error terms. Then, use the FORECAST with PATH option.

I don't quite getting the mapping in the above codes. Also, is there a way to get the residuals after %modelsetcoeffs(varmodel,betadraw)? That is, get the residuals after each draw of the betas.I know I can do it brute force using %modelgetcoeffs and then applying the VAR equations. Thanks. Luching.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Historical Decomposition & Counterfactual Simulation

Unread post by TomDoan »

Yes. This does only the effect of the adding the one shock that you isolated.
Post Reply