error in mod file of risk shocks (2014, AER)

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.

error in mod file of risk shocks (2014, AER)

Postby HouseC » Fri Aug 26, 2016 3:35 pm

Dear all,

While I'm trying to run the main file of “Risk Shocks” by Christiano, Motto and Rostagno (2014,AER). Dynare returns error message.
For the mod file, it's available at the AER website: https://www.aeaweb.org/aer/data/jan2014 ... 2_data.zip
The main file is within the subfolder: cmrfiles\figure1.
My dynare version is 4.4.3. The error message is:
The posterior mode file cmr_mode has been generated using another specification of the model or another model!
--> Estimated parameter iota_p is not present in the loaded mode file.
--> Estimated parameter iotaw_p is not present in the loaded mode file.
--> Estimated parameter signal_corr_p is not present in the loaded mode file.
--> Estimated parameter stdsigma2_p is not present in the loaded mode file.
--> Estimated parameter stdsigma1_p is not present in the loaded mode file.
Error using dynare_estimation_init (line 234)
Please change the mode_file option, the list of estimated parameters or
set mode_compute>0.


When I search for this issue. I find that Professor Johannes Pfeifer mentioned this issue at https://github.com/DynareTeam/dynare/issues/519
I add the codes before "estimation" in the main mod file. After the modification, steady state is solved and rank conditions are satisfied. Yet, the error message change as the following:

Loading 118 observations from data_BAAoverTB.mat

Reference to non-existent field 'nvn_observable_correspondence'.
Error in set_all_parameters (line 78)
k = estim_params.nvn_observable_correspondence(i,1);
Error in check_for_calibrated_covariances (line 38)
M = set_all_parameters(xparam1,estim_params,M);
Error in dynare_estimation_1 (line 89)
estim_params_=check_for_calibrated_covariances(xparam1,estim_params_,M_);
Error in dynare_estimation (line 89)
dynare_estimation_1(var_list,dname);
Error in cmr (line 3085)
dynare_estimation(var_list_);
Error in dynare (line 180)
evalin('base',fname) ;


I try to run the mod file using unstable dynare version, and the error message is still there.

I want to know, is there any stable dynare version that could successfully run this code? Or how to solve the error displayed above.
HouseC
 
Posts: 41
Joined: Fri Apr 19, 2013 3:36 am

Re: error in mod file of risk shocks (2014, AER)

Postby HouseC » Sun Aug 28, 2016 3:17 pm

Anyone could help?
HouseC
 
Posts: 41
Joined: Fri Apr 19, 2013 3:36 am

Re: error in mod file of risk shocks (2014, AER)

Postby jpfeifer » Mon Aug 29, 2016 6:31 am

Please provide the files.
------------
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: error in mod file of risk shocks (2014, AER)

Postby HouseC » Tue Aug 30, 2016 4:40 am

jpfeifer wrote:Please provide the files.


Dear Johannes,
Thanks for your reply.
Please find the attached file, which is downloaded from AER website.
I simply run "dynare cmr.mod" within in the subfolder "figure1".
And dynare return error message on "cmr_mode". Then I follow your suggestion in Github and add the following codes in the main mod file, just before the estimation command.
Code: Select all
load cmr_mode
parameter_names(strcmp('iota1_p',parameter_names),:) = {'iota_p'};
parameter_names(strcmp('iotaw1_p',parameter_names),:) = {'iotaw_p'};
parameter_names(strcmp('stdsigmax_p',parameter_names),:) = {'stdsigma2_p'};
parameter_names(strcmp('stdsigma_p',parameter_names),:) = {'stdsigma1_p'};
parameter_names(strcmp('par8_p',parameter_names),:) = {'signal_corr_p'};
save cmr_mode xparam1 hh parameter_names


After the modification, I was stuck by the error message mentioned above.
Best,
Sihao
HouseC
 
Posts: 41
Joined: Fri Apr 19, 2013 3:36 am

Re: error in mod file of risk shocks (2014, AER)

Postby HouseC » Fri Sep 02, 2016 3:29 am

Dynare version 4.3.2. is fine to run the code.
Anyone has suggestion to modify the code to such that updated Dynare version (4.4.3) could compile?
HouseC
 
Posts: 41
Joined: Fri Apr 19, 2013 3:36 am

Re: error in mod file of risk shocks (2014, AER)

Postby jpfeifer » Sat Sep 03, 2016 9:43 am

Due to the changes CMR did in
Code: Select all
mrfiles\dynare_code

their code is only compatible with Dynare 4.3.2, not Dynare 4.4. Circumventing this is challenging. If you don't want to re-estimate the model, you might be able to use the version in the Macro Model Database.
------------
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: error in mod file of risk shocks (2014, AER)

Postby HouseC » Sat Sep 03, 2016 12:41 pm

jpfeifer wrote:Due to the changes CMR did in
Code: Select all
mrfiles\dynare_code

their code is only compatible with Dynare 4.3.2, not Dynare 4.4. Circumventing this is challenging. If you don't want to re-estimate the model, you might be able to use the version in the Macro Model Database.


Thanks for your reply, Johannes!
HouseC
 
Posts: 41
Joined: Fri Apr 19, 2013 3:36 am


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 6 guests