JohannesPfeifer / DSGE_mod

A collection of Dynare models
GNU General Public License v3.0
445 stars 376 forks source link

Running a counterfactual simulation in Garcia-Cicco et al (2010) model code #2

Closed malikshuk closed 6 years ago

malikshuk commented 6 years ago

Hello, Is there an easy way to run a counterfactual simulation with some of the estimated smoothed shocks being shut down? If this issue has already been discussed I would appreciate a link. The model file I am working with is for replicating Garcia-Cicco et al (2010). Thank you M

JohannesPfeifer commented 6 years ago

You need to use the simult_-function and select the smoothed shocks you want, starting from the initial condition. It should be similar to https://github.com/DynareTeam/dynare/blob/master/tests/kalman_filter_smoother/compare_results_simulation/fs2000.mod

malikshuk commented 6 years ago

Thank you for the suggestion. I tried t adjust my file accordingly but got the following error message:

_Cell contents reference from a non-cell array object.

Error in JPfeiferRBCinEMEsMS (line 348) ex=[ex oo.SmoothedShocks.(M_.exo_names{shock_iter})];

Error in dynare (line 223) evalin('base',fname) ;_

I am using Dynare 4.5.3 and unfortunately unsure how to deal with this problem. I am guessing it some sort of compatibility problem. Thank you M

JohannesPfeifer commented 6 years ago

@malikshuk The link above works for the unstable. In Dynare 4.5, the code is https://github.com/DynareTeam/dynare/blob/4.5/tests/kalman_filter_smoother/compare_results_simulation/fs2000.mod

malikshuk commented 6 years ago

Thank you for the link! It did not work immediately but once I removed the extension .Mean in lines 121 and 129 it seems to work. Somehow the extension .Mean works neither in Dynare 4.5 nor in unstable versions. Thanks again. Malik

JohannesPfeifer commented 6 years ago

@malikshuk Whether the mean-field exists or not depends on whether you run ML or Bayesian estimation and whether the MCMC was run.

malikshuk commented 6 years ago

Got it, thank you.