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) ; 
example1.mod  (1.66 KB)
             
            
               
               
               
            
            
           
          
            
            
              The datafile is missing. Have you tried the unstable version?
             
            
               
               
               
            
            
           
          
            
            
              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, 
example1.mod  (1.66 KB)
             
            
               
               
               
            
            
           
          
            
            
              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 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 github.com/DynareTeam/dynare/blob/master/tests/shock_decomposition/example1_calib_shock_decomp.mod