Commit 697ddc0a authored by Marco Ratto's avatar Marco Ratto
Browse files

Aligned routines with recent changes in dataset and identification.

Fixed ls2003.mod for testsuite
parent 29a12f0c
......@@ -79,7 +79,7 @@ if options_ident.gsa_sample_file,
end
pdraws0 = [lpmatx lpmat(istable,:)];
clear lpmat lpmat0 istable;
else
elseif nargin==1,
pdraws0=[];
end
external_sample=0;
......
......@@ -34,6 +34,7 @@ loadSA = options_gsa_.load_rmse;
pfilt = options_gsa_.pfilt_rmse;
alpha = options_gsa_.alpha_rmse;
alpha2 = options_gsa_.alpha2_rmse;
pvalue = options_gsa_.pvalue_corr;
istart = options_gsa_.istart_rmse;
alphaPC = 0.5;
......@@ -96,21 +97,21 @@ if options_.opt_gsa.ppost,
else
if options_.opt_gsa.pprior
fnamtmp=[fname_,'_prior'];
DirectoryName = CheckPath(['GSA' filesep 'prior']);
DirectoryName = CheckPath(['gsa' filesep 'prior']);
else
fnamtmp=[fname_,'_mc'];
DirectoryName = CheckPath(['GSA' filesep 'mc']);
DirectoryName = CheckPath(['gsa' filesep 'mc']);
end
end
if ~loadSA,
if exist('xparam1','var')
set_all_parameters(xparam1);
steady_;
steady_(M_,options_,oo_);
ys_mode=oo_.steady_state;
end
if exist('xparam1_mean','var')
set_all_parameters(xparam1_mean);
steady_;
steady_(M_,options_,oo_);
ys_mean=oo_.steady_state;
end
% eval(options_.datafile)
......@@ -657,7 +658,7 @@ else
fnam = ['rmse_mc_',deblank(vvarvecm(i,:))];
end
end
stab_map_2(x(ixx(1:nfilt0(i),i),:),alpha2,fnam, OutDir);
stab_map_2(x(ixx(1:nfilt0(i),i),:),alpha2,pvalue,fnam, OutDir);
% [pc,latent,explained] = pcacov(c0);
% %figure, bar([explained cumsum(explained)])
......
......@@ -40,7 +40,8 @@ if opt_gsa.load_ident_files==0,
if opt_gsa.morris==2,
[pdraws, TAU, GAM] = dynare_identification(options_.options_ident,[lpmatx lpmat(istable,:)]);
pdraws = dynare_identification(options_.options_ident,[lpmatx lpmat(istable,:)]);
% [pdraws, TAU, GAM] = dynare_identification(options_.options_ident,[lpmatx lpmat(istable,:)]);
if max(max(abs(pdraws-[lpmatx lpmat(istable,:)])))==0,
disp(['Sample check OK ', num2str(max(max(abs(pdraws-[lpmatx lpmat(istable,:)]))))]),
clear pdraws;
......@@ -152,7 +153,8 @@ if opt_gsa.load_ident_files==0,
else
if opt_gsa.morris==2,
% [pdraws, TAU, GAM] = dynare_identification([1:npT]); %,[lpmatx lpmat(istable,:)]);
[pdraws, TAU, GAM] = dynare_identification(options_.options_ident);
% [pdraws, TAU, GAM] = dynare_identification(options_.options_ident);
pdraws = dynare_identification(options_.options_ident);
end
load([OutputDirectoryName,'/',fname_,'_main_eff'],'ac','cc','vdec','yt','mss')
end
......
......@@ -211,6 +211,7 @@ disp('Press ENTER to continue'); pause(5);
//alpha_rmse=1 // no Smirnov sensitivity analysis
//);
/*
disp(' ');
disp('RMSE ANALYSIS FOR POSTERIOR MCMC sample (ppost=1)');
disp('Needs a call to dynare_estimation to load all MH environment');
......@@ -220,5 +221,5 @@ estimation(datafile=data_ca1,first_obs=8,nobs=79,mh_nblocks=2, mode_file=ls2003_
dynare_sensitivity(stab=0, // no need for stability analysis since the posterior sample is surely OK
rmse=1,ppost=1,alpha2_rmse=1,alpha_rmse=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