Variance decomposition

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

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

Thanks Reuben!
Best,
Joao

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

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

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

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

Sorry, this isn’t finished yet

Best

Michel

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

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.

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.

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

[quote=“jmadeira”]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[/quote]

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

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 periods=0 is preferable.