Comparison theoritical vs empirical moments


I have estimated a dsge model with 2 order approximation (period=0) and use prunning to smooth Irfs as they were explosive and i was wondering what is the best aproach to check the fitness of the data produced from the model. Should i compare the theoritical moments with the ones from actual data or should i generate simulated series ( stoch simul command with period>0) and compare the empirical moments provided with the actual ones from the data?



Ideally, both should give you the same answer. If you are worried about small sample issues, go for the simulated moments.

Thank you @jpfeifer. Just to clarify a couple of things:

  1. I am running the model without periods, to get the theortical moments, but when checking oo_. endosimul matrix for the simulated data no data are populated although the model has been solved and estimated. Any idea on what is going on?
  2. I do the same with periods>0 to get the simulated data. The thing is which simulated data i should use, meaning i get a bit different moments when simulating under a tecnholgy shock or under a cost shock. Is IT an issue that they are quite different
  3. Finally, the Log Hp filtered actual data seems to have a std of 0.05 (C and Y), while the simulated one (i.e under a tech shoch) have an std of 0.01. Is these difference considered material?



  1. oo_.endo_simul does not store moments, but rather simulations. Theoretical variances are in oo_.var
  2. Of course moments differ when you use different shocks.
  3. You need to compare moments after applying the same filter. And yes, having 1 percent variability instead of 5 percent is material.

thanks @jpfeifer.

Since each shock produces different moments, with what moments i should compare the moments from actual transformed data?

Regarding the 3rd point I have take logs and HP filtered both actual data and the simulated ones and had these difference. Any idea on that?

In the data, you have unconditional moments, i.e. with all types of shocks happening all the time. You should not try to compare this to conditional moments in the model, i.e. if only one type of shocks happens in the model.

Thanks @jpfeifer. I Will check it.

Hi again @jpfeifer, i tried to compare the actual transformed data with simulated data uncoditional moments (i. e under all shocks) and i have big variances.

Considering that, i would like to ask that since the model i have is expressed in logs (using exp()) instead of levels what exactly the simulated data express? They are also logs?



What exactly do you do. Please provide sample codes.

I compare for example the std from the actual data (xls file Euro, the last 2 columns for C and Y) with those produced from the (DSGE_test.mod (6.9 KB) model (transformed with HP filter as per the actual data) [Euro.xls|attachment] (upload://a40FeRLhh9TWv8dxoCkCaWystVQ.xls) (95.5 KB)Euro.xls (95.5 KB)

Dear @jpfeifer,

sorry for the impatience but have you been able to take a look on the issue?

  1. You need to consult “Remark 10 (Scaling With a Factor 100)” in Pfeifer (2013): “A Guide to Specifying Observation Equations for the Estimation of DSGE Models”. You cannot use 1 to denote 1 percent. Generally, you need to set the shock variances correctly instead to 100 percent.
  2. Note that you did not correctly compute the HP trend of consumption in your Excel file.