shock_decomposition error

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.

shock_decomposition error

Postby rmariscalparedes » Tue Sep 13, 2016 1:44 am

Hello,

I have an error when I do shock decomposition using Dynare 4.4.3 and Dynare 4.3.2. I even get the error using an example file from F. Collard

Really appreciate some help.

This is the error and see attached file:

Error using evaluate_smoother
Too many output arguments.

Error in shock_decomposition (line 67)
[oo,Smoothed_Variables_deviation_from_mean] = evaluate_smoother(parameter_set,varlist);

Error in example1 (line 168)
oo_ = shock_decomposition(M_,oo_,options_,var_list_);

Error in dynare (line 180)
evalin('base',fname) ;
Attachments
example1.mod
(1.66 KiB) Downloaded 48 times
rmariscalparedes
 
Posts: 2
Joined: Tue Sep 13, 2016 1:33 am

Re: shock_decomposition error

Postby jpfeifer » Tue Sep 13, 2016 9:04 am

The datafile is missing. Have you tried the unstable version?
------------
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: shock_decomposition error

Postby rmariscalparedes » Sat Sep 17, 2016 10:46 pm

Hi jpfeifer,

Thanks for the response. I'm using a calibrated model, I shouldn't be using any data, right? The file "example1_calib_shock_decomp_data" is an empty mat file where the results are going to be stored. Is that right?

I tried using unstable version but still got an error:

Error using : (line 62)
dates::colon: init must precede !

Error in dseries (line 137)
ts.dates = init:init+(nobs(ts)-1);

Error in makedataset (line 103)
DynareDataset = dseries(datafile);

Error in dynare_estimation_init (line 542)
[dataset_, dataset_info, newdatainterfaceflag] = makedataset(options_, options_.dsge_var*options_.dsge_varlag, gsa_flag);

Error in evaluate_smoother (line 59)
[dataset_,dataset_info,xparam1, hh, M_, options_, oo_, estim_params_,bayestopt_] = dynare_estimation_init(var_list, M_.fname, [], M_,
options_, oo_, estim_params_, bayestopt_);

Error in shock_decomposition (line 67)
[oo,Smoothed_Variables_deviation_from_mean] = evaluate_smoother(parameter_set,varlist);

Error in example1 (line 179)
oo_ = shock_decomposition(M_,oo_,options_,var_list_);

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


I'm using Matlab_R2016a on a Mac OS X El Capitan
Thank you again,
Attachments
example1.mod
(1.66 KiB) Downloaded 33 times
rmariscalparedes
 
Posts: 2
Joined: Tue Sep 13, 2016 1:33 am

Re: shock_decomposition error

Postby jpfeifer » Sun Sep 18, 2016 9:30 am

Of course you need a datafile. shock_decomposition conducts a historical decomposition of the variables' deviations from their mean in terms of shocks that drove them. How are you supposed to do this historical decomposition without a history of data? The datafile at https://github.com/DynareTeam/dynare/raw/master/tests/shock_decomposition/example1_calib_shock_decomp_data.mat is not empty and should work with the mod-file at https://github.com/DynareTeam/dynare/blob/master/tests/shock_decomposition/example1_calib_shock_decomp.mod
------------
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: Google [Bot] and 6 guests