Dynare_sensitivity: 2 errors

Hi,

Can I get your response to two of my issues? One error appears when I run dynare_sensitivity (redform=1, namendo=(y yno c er), namexo=(egi egc epo), graph_format=fig). It says “Download Mapping routines at:
eemc.jrc.ec.europa.eu/softwareDYNARE-Dowload.htm
Error using dynare_sensitivity (line 249)
Mapping routines missing!
Error in Model10 (line 574)
dynare_sensitivity(options_gsa);
Error in dynare (line 120)
evalin(‘base’,fname) ;”
I am not sure which mapping routine is missing, as I am using Dynare 4.3.2.

Another error is when I run dynare_sensitivity (rmse=1, var_rmse=(y c gc nx infl b er ir bf int of orev fdi po), graph_format=fig). It says “Attempt to reference field of non-structure array.
Error in prior_posterior_statistics (line 43)
Y = dataset.data;
Error in dynare_sensitivity (line 284)
prior_posterior_statistics(‘gsa’,dataset_);
Error in Model10 (line 584)
dynare_sensitivity(options_gsa);
Error in dynare (line 120)
evalin(‘base’,fname) ;”
The mod-file is attached.

Thank you
Model.mod (13.3 KB)

Concerning the first errors, mapping routines are not distributed with dynare but downloadable separately as follows:

Download here the Recursive SS-ANOVA Toolbox for MATLAB version >= 7.5.
ipsc.jrc.ec.europa.eu/fileadmin/ … recurs.zip (~ 38 Kb) Posted 07/02/2012

ipsc.jrc.ec.europa.eu/fileadmin/ … an_7.5.zip (MATLAB version < 7.5) (~ 105 Kb) Posted 04/07/2008

Concerning the second error, the data file is missing. You have to declare it as if you were estimating in order to compute the rmse’s.

best

Thank you for the reply. Yet, after downloading the routine I still get an error
"Index exceeds matrix dimensions.
Error in redform_map (line 85)
xx0=lpmat0(istable,:);
Error in dynare_sensitivity (line 252)
redform_map(OutputDirectoryName,options_gsa);
Error in Model (line 578)
dynare_sensitivity(options_gsa);
Error in dynare (line 120)
evalin(‘base’,fname) ;"

Why is it so? What are these two matrices xx0=lpmat(istable,:slight_smile: and x0=lpmat(istable,:slight_smile: doing? How can I fix the first one, if possible?
Sorry for keeping you with this.

There is a bug in the toolbox for when there is no shock estimated. These bugs were fixed for other functions but I skipped the problem here.
This is going to be updated soon in git, both in master and 4.3. However, since for 4.3 there will be probably no further release, either you add a shock to estimated param list or you use the attached files replacing the existing ones in the 4.3.3 release.
prior_posterior_statistics.m (10.3 KB)
redform_map.m (17.1 KB)
map_ident_.m (54.3 KB)
dat_fil_.m (1.22 KB)

Thank you, redform works when I specify a shock in estimated parameters as you advised. But not all displayed figures are saved in the default folder.
If I don’t include a shock and replace old files with those you’ve provided, the same error still appears “Index exceeds matrix dimensions…”

As for the second issue about using rmse, my data file cannot be read. The message is “Loading 41 observations from data_dif.xls
Starting sensitivity analysis
for the fit of EACH observed series …
Deleting old SA figures…
done !
Error using load
Unable to read file data_dif: No such file or directory.
Error in dat_fil_ (line 30)
load(data_file);
Error in filt_mc_ (line 126)
obs = dat_fil_(options_.datafile);
Error in dynare_sensitivity (line 357)
filt_mc_(OutputDirectoryName,options_gsa);
Error in Model (line 582)
dynare_sensitivity(options_gsa);
Error in dynare (line 120)
evalin(‘base’,fname) ;”

I’ve attached the data file, if needed. Just to clarify one thing for my estimation in future: is it OK if I provide series, which are shorter than others, or all series in the data file should be of the same length?

Thanks
data_dif.xls (26.5 KB)

Sorry, I’ve just noticed that I replaced files in the wrong subfolder. Now, the first issue works in both cases, thank you!