Clean up setting of options in dynare_sensitivity.m
Currently, it is very intransparent and prone to bugs.
-
neighborhood_width
forces
if options_gsa.neighborhood_width,
options_gsa.pprior=0;
options_gsa.ppost=0;
end
but the manual says that neighborhood_width
only works when pprior=0
and ppost=0
. This seems like a bug. If we reset options set by the user, we should consistently provide warnings on the screen.
- Even more problematic, without any indication in the manual, using
morris=1
overwrites almost all other user-specified options:
if options_gsa.morris==1,
if ~options_gsa.identification,
options_gsa.redform=1;
end
options_gsa.pprior=1;
options_gsa.ppost=0;
%options_gsa.stab=1;
options_gsa.glue=0;
options_gsa.rmse=0;
options_gsa.load_rmse=0;
options_gsa.alpha2_stab=1;
options_gsa.ksstat=1;
options_gsa.pvalue_ks=0;
options_gsa.pvalue_corr=0;
OutputDirectoryName = CheckPath('gsa/screen',M_.dname);
else
OutputDirectoryName = CheckPath('gsa',M_.dname);
end
In particular, that results in none of the user-requested output being displayed. See http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=7115. @rattoma Is there a particular reason for this? I could not find any apparent incompatibility of morris=1
with e.g. posterior sampling.