Commit 5965c8e3 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Merge pull request #382 from rattoma/master

bug fixes in mode_compute=5 and gsa
parents 70ccb1d0 ab5b922e
......@@ -31,6 +31,7 @@ lgy_ = M_.endo_names;
x0=[];
options_gsa = set_default_option(options_gsa,'datafile',[]);
options_gsa = set_default_option(options_gsa,'rmse',0);
if isfield(options_gsa,'nograph'),
options_.nograph=options_gsa.nograph;
end
......@@ -46,7 +47,14 @@ end
options_.order = 1;
if ~isempty(options_gsa.datafile) || isempty(bayestopt_),
if ~isempty(options_gsa.datafile) || isempty(bayestopt_) || options_gsa.rmse,
if isempty(options_gsa.datafile) && options_gsa.rmse,
disp('The data file and all relevant estimation options ')
disp('[first_obs, nobs, presample, prefilter, loglinear, lik_init, kalman_algo, ...]')
disp('must be specified for RMSE analysis!');
error('Sensitivity anaysis error!');
end
options_.datafile = options_gsa.datafile;
if isfield(options_gsa,'first_obs'),
options_.first_obs=options_gsa.first_obs;
......@@ -142,7 +150,6 @@ options_gsa = set_default_option(options_gsa,'namendo',[]);
options_gsa = set_default_option(options_gsa,'namlagendo',[]);
options_gsa = set_default_option(options_gsa,'namexo',[]);
% RMSE mapping
options_gsa = set_default_option(options_gsa,'rmse',0);
options_gsa = set_default_option(options_gsa,'lik_only',0);
options_gsa = set_default_option(options_gsa,'var_rmse',options_.varobs);
options_gsa = set_default_option(options_gsa,'pfilt_rmse',0.1);
......
......@@ -236,7 +236,7 @@ while norm(gg)>gtol && check==0 && jit<nit
end
H = igg;
end
else
elseif analytic_derivation,
[fvalx,gg,hh]=feval(func0,xparam1,DynareDataset,DynareOptions,Model,EstimatedParameters,BayesInfo,DynareResults);
hhg=hh;
H = inv(hh);
......
......@@ -214,5 +214,6 @@ disp('Press ENTER to continue'); pause(5);
// prefilter=1,mh_jscale=0.5,mh_replic=0, mode_compute=0, mh_drop=0.6);
dynare_sensitivity(nodisplay, graph_format=fig,stab=0, // no need for stability analysis since the posterior sample is surely OK
datafile=data_ca1,first_obs=8,nobs=79,prefilter=1,
rmse=1,ppost=1);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment