Page 1 of 1
Uncond. second moments-actual data vs. estimated DSGE model
Posted:
Fri Jul 10, 2015 6:35 pm
by econ86
Dear all,
after the estimation of a DSGE model researchers usually compare unconditional second moments in the estimated DSGE model with those based on the actual data. Here is an example how unconditional second moments can be computed for the estimated DSGE model (this example is based on ALLV paper: Bayesian Estimation of an Open Economy DSGE Model with Incomplete Pass-Through):
For the model, we report the median from the simulated distribution of moments, computed from the 12,204
samples of length 92 periods each, which were generated by simulating the DSGE model using parameters bootstrapped
off the posterior distribution.
Does anyone know how to implement this in Dynare?
Best,
Re: Uncond. second moments-actual data vs. estimated DSGE mo
Posted:
Sat Jul 11, 2015 8:21 am
by jpfeifer
At the current stage, this is a bit complicated. Proposed functionality for this can be found at
https://github.com/DynareTeam/dynare/pull/871
Re: Uncond. second moments-actual data vs. estimated DSGE mo
Posted:
Sat Jul 11, 2015 9:21 am
by econ86
Dear jpfeifer,
thank you for your answer. Is there any other (simplest) way to do this exercise in Dynare - to compare moments of data generated by the estimated DSGE model with those based on the actual data? What do you suggest?
Maybe the use of get_simul_replications.m (from your personal web page) together with the command stoch_simul after the estimation of a DSGE model?
Best regards,
Re: Uncond. second moments-actual data vs. estimated DSGE mo
Posted:
Sat Jul 11, 2015 9:45 am
by jpfeifer
If you are a bit more flexible, you can immediately compare the theoretical moments of the model with the ones of the data. An example is the GarciaCiccoetal2010.mod on my homepage. But this implies that you use first differences as the filter.
Re: Uncond. second moments-actual data vs. estimated DSGE mo
Posted:
Sun Jul 12, 2015 9:16 am
by econ86
If I understand you correctly, you simply compare the theoretical moments that are calculated after using the command stoch_simul?
Re: Uncond. second moments-actual data vs. estimated DSGE mo
Posted:
Mon Jul 13, 2015 7:55 am
by jpfeifer
Not exactly. The theoretical moments come from the estimation routine using the
- Code: Select all
moments_varendo
, not from stoch_simul.
Re: Uncond. second moments-actual data vs. estimated DSGE mo
Posted:
Thu Jul 16, 2015 5:08 am
by econ86
Dear Mr jpfeifer,
thank you very much for your help. As you suggested I additionally included the command moments_varendo in the estimation command. But in this case the estimation does not finish. It ends up with Bayesian irf-s, but Dynare does not execute, for example, smoother, filtered_vars, shock_decomposition (graphs for these things are missing). In the end there is also no estimation time displayed.
I use the following:
estimation(datafile=MyData, presample = 0, prefilter = 0, mh_replic = 200000, mode_compute=6,
mh_nblocks = 2, mh_jscale = 0.25, filtered_vars, smoother, moments_varendo, bayesian_irf, graph_format = (fig,pdf));
shock_decomposition pi_data dy_data di_data dc_data;
My version of Dynare is 4.4.3.
Do you have any suggestion what's going wrong?
Thank you.
Re: Uncond. second moments-actual data vs. estimated DSGE mo
Posted:
Thu Jul 16, 2015 6:32 am
by jpfeifer
You most probably did not wait until the computations were finished. Computing endogenous moments can take quite long.
Re: Uncond. second moments-actual data vs. estimated DSGE mo
Posted:
Sat Jul 18, 2015 9:21 am
by econ86
I finally got the results!
Results are stored in oo_.PosteriorTheoreticalMoments which is of the following structure:
-covariance
-correlation
-VarianceDecomposition
*Mean
*Median
*Variance
*HPDinf
*HPDsup
*deciles
*density
-ConditionalVarianceDecomposition
*Steps
*Mean
*Median
*Variance
*HPDinf
*HPDsup
*deciles
*density
My question is: where exactly are the unconditional second moments of endogenous variables stored?
Best,
Re: Uncond. second moments-actual data vs. estimated DSGE mo
Posted:
Sun Jul 19, 2015 12:11 pm
by jpfeifer
In the covariance field of course.