variance decomposition

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

variance decomposition

Postby jmadeira » Wed Jan 09, 2008 3:22 am

Hi,
Can dynare do variance decomposition (calculate the contribution of each shock in explaining variation for the model's variables) like it is done in the Smets and Wouters papers?

Best,
Joao
jmadeira
 
Posts: 27
Joined: Fri Sep 28, 2007 6:51 pm

Postby reubenpjacob » Mon Jan 14, 2008 10:13 am

yes
do stoch_simul after the estimation command ( or just stoch_simul for a calibrated model). that should give you the infinite horizon var. deco.
for shorter horizons you will have to code yourself.

cheers
reuben
reubenpjacob
 
Posts: 133
Joined: Fri Oct 06, 2006 3:23 pm
Location: Reserve Bank of New Zealand

Postby jmadeira » Mon Jan 14, 2008 1:10 pm

Thanks Reuben!
Best,
Joao
jmadeira
 
Posts: 27
Joined: Fri Sep 28, 2007 6:51 pm

Postby jmadeira » Sun Jan 20, 2008 10:54 am

Hi all,

I want to do a variance decomposition analysis (similar to what is done in Smets and Wouters papers).

I can't find the variance decomposition (the contribution of each shock in explaining endogenous variables fluctuations) among the output of stoch_simul.

Is this something only available in v4 (I'm using v3.065)?

Is this something that I can compute using the policy and transition functions with the variances and covariances outputs ?

Does anyone know a reference as to how Smets and Wouters did the variance decomposition (the paper shows the results but not how they were achieved)?

Best,
Joao
jmadeira
 
Posts: 27
Joined: Fri Sep 28, 2007 6:51 pm

Postby MichelJuillard » Sun Jan 20, 2008 12:27 pm

The variance decomposition is available in
oo_.gamma_y{nar+2}
where nar is the number of autocorellation coefficients that are computed. By default this is 5 and the variance decomposition is in
oo_.gamma_y{7}

Best

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Postby jmadeira » Sun Jan 20, 2008 3:00 pm

Thanks Michel!

Bhut I do not find oo_.gamma_y{7} when using the stoch_simul or estimation comand.

Is it not available in version 3.065? Or do I need to use a particular comand so that it will show up in the matlab workspace?

Thanks!
Best,
Joao
jmadeira
 
Posts: 27
Joined: Fri Sep 28, 2007 6:51 pm

variance decomposition

Postby wgonzalez » Sun Jan 20, 2008 3:31 pm

Michael, how can I do to find the contribution of each shock for example the gdp over a sample or over the future forecast? I know that is possible find the asymptotic using stoch_simul, but exist a shortcoming using dynare without programming this in a different code? I remember that Larry Christiano post a code and you say that the variance decomposition will be available in the future for dynare v4, is that already available?

Best

W
wgonzalez
 
Posts: 13
Joined: Sat Mar 11, 2006 2:29 pm

Postby MichelJuillard » Sun Jan 20, 2008 7:24 pm

Sorry, this isn't finished yet

Best

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Postby jmadeira » Sun Jan 20, 2008 8:30 pm

Thanks Reuben and Michel!

My problem with this is solved.

What happened is that I used stoch_simul( ).
I now just write stoch_simul;

and I obtain all the results I want (including the variance decomposition).

Best,
Joao
jmadeira
 
Posts: 27
Joined: Fri Sep 28, 2007 6:51 pm

Postby agupta28 » Tue Mar 04, 2008 2:22 am

Dear Joao,

I am having the similar problem that you are having of not being able to see the variance decomposition results in the workfile. Please help on how to fix that.

thanks,

abhishek.
abhishek
agupta28
 
Posts: 29
Joined: Tue Mar 04, 2008 2:17 am

variance decomposition

Postby agupta28 » Tue Mar 04, 2008 2:53 am

Hi Everybody,

I am a new user of dynare and have a question. Is variance decomposition possible only after estimation. Or can we also get the variance decomposition after solving the model as well?

After reading previous posts it seems variance decomposition is possible only after estimation command. Could someone please help me understand the link between variance decomposition and estimation.

thanks,

abhishek.
abhishek
agupta28
 
Posts: 29
Joined: Tue Mar 04, 2008 2:17 am

Postby reubenpjacob » Tue Mar 04, 2008 9:30 am

hi abhishek
dynare, as of now, gives only the unconditional asymptotic var decomp.
one can do the var decomp even for a simple calibration exercise. dynare solves the model for the set of values that you provide for the structural parameters and shocks.
when you do the estimation command, dynare estimates the model and finds the estimates of the parameters. so when you do stoch_simul after the estimation command, the model is solved at the estimated parameter values and then the solution is used to compute the var decomp and other statistics.
if you want to do the various decomposition for shorter horizons, less than infinity, you will have to code yourself.


reuben
reubenpjacob
 
Posts: 133
Joined: Fri Oct 06, 2006 3:23 pm
Location: Reserve Bank of New Zealand

Re: variance decomposition

Postby xxn510 » Thu Jun 30, 2016 12:53 pm

jmadeira wrote:Hi,
Can dynare do variance decomposition (calculate the contribution of each shock in explaining variation for the model's variables) like it is done in the Smets and Wouters papers?

Best,
Joao


Hi Joao,

I met the same problem and now it is solved. First I used "stoch_simul(periods=196,order=1,irf=40)", and there was no variance decomposition in the results; Then I adjusted to "stoch_simul(order=1,irf=40)", variance decomposition showed up. So you can use the order stoch_simul, but without the "periods=" term.

Best,
Xuenan
xxn510
 
Posts: 3
Joined: Thu Jun 30, 2016 12:44 pm
Location: Berlin, Germany

Re: variance decomposition

Postby jpfeifer » Thu Jun 30, 2016 12:59 pm

Actually, the unstable version (to be released as Dynare 4.5) now also provides a simulated variance decomposition. However, usually the theoretical one, based on
Code: Select all
periods=0
is preferable.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 8 guests