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

Dear Reuben,

Thanks for replying to the post. Could you also let me know how one can do the unconditional asymptotic var decomposition using dynare if we are only doing a simple calibration exercise.

thanks,

abhishek.

for some reason that doesn’t work. I have tried stoch_simul and reading from previous posts the variance decomposition should be in the oo_.gamma_y matrix but this matrix does not appear in the workfile when I do stoch_simul for a calibration exercise.

However when i do stoch_simul after estimation it works.

do u have any idea what might be going on??

as far as i know, the var decomp only comes in the command window ( and hence in the log file). it is not stored anywhere.

from

dynare.org/manual/re32.html#id392307 *

you can see that oo_.gamma_y only provides the theoretical variance-covariance matrix of the endogenous variables. this is NOT the variance decomposition.

once you do stoch simul, the var decomp comes in the command window.

this should work always.

NB: *new url

I figured why it doesn’t work when u give stoch_simul (options). It specifically doesn’t work with the option ‘periods’. When you specify the option periods then dynare calculates all moments for the simulated variables and since we know that dynare currently is not programmed to calculate the variance decomposition for a finite time period it doesn’t print the variance decomposition.

you can use all other options with stoch_simul except periods and still get the variance decomposition in the command window.

thanks reuben