Uncond. second moments-actual data vs. estimated DSGE model

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.

Uncond. second moments-actual data vs. estimated DSGE model

Postby econ86 » Fri Jul 10, 2015 6:35 pm

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,
econ86
 
Posts: 78
Joined: Sun Apr 26, 2015 10:32 am

Re: Uncond. second moments-actual data vs. estimated DSGE mo

Postby jpfeifer » Sat Jul 11, 2015 8:21 am

At the current stage, this is a bit complicated. Proposed functionality for this can be found at https://github.com/DynareTeam/dynare/pull/871
------------
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

Re: Uncond. second moments-actual data vs. estimated DSGE mo

Postby econ86 » Sat Jul 11, 2015 9:21 am

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,
econ86
 
Posts: 78
Joined: Sun Apr 26, 2015 10:32 am

Re: Uncond. second moments-actual data vs. estimated DSGE mo

Postby jpfeifer » Sat Jul 11, 2015 9:45 am

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.
------------
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

Re: Uncond. second moments-actual data vs. estimated DSGE mo

Postby econ86 » Sun Jul 12, 2015 9:16 am

If I understand you correctly, you simply compare the theoretical moments that are calculated after using the command stoch_simul?
econ86
 
Posts: 78
Joined: Sun Apr 26, 2015 10:32 am

Re: Uncond. second moments-actual data vs. estimated DSGE mo

Postby jpfeifer » Mon Jul 13, 2015 7:55 am

Not exactly. The theoretical moments come from the estimation routine using the
Code: Select all
moments_varendo
, not from stoch_simul.
------------
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

Re: Uncond. second moments-actual data vs. estimated DSGE mo

Postby econ86 » Thu Jul 16, 2015 5:08 am

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.
econ86
 
Posts: 78
Joined: Sun Apr 26, 2015 10:32 am

Re: Uncond. second moments-actual data vs. estimated DSGE mo

Postby jpfeifer » Thu Jul 16, 2015 6:32 am

You most probably did not wait until the computations were finished. Computing endogenous moments can take quite long.
------------
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

Re: Uncond. second moments-actual data vs. estimated DSGE mo

Postby econ86 » Sat Jul 18, 2015 9:21 am

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,
econ86
 
Posts: 78
Joined: Sun Apr 26, 2015 10:32 am

Re: Uncond. second moments-actual data vs. estimated DSGE mo

Postby jpfeifer » Sun Jul 19, 2015 12:11 pm

In the covariance field of course.
------------
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 4 guests

cron