Commit ec0af45f authored by MichelJuillard's avatar MichelJuillard
Browse files

further fixes to gsa testsuite; make gsa compatible with Linux

parent eb13241d
......@@ -87,9 +87,9 @@ if strcmpi(type,'posterior')
MhDirectoryName = CheckPath('metropolis');
elseif strcmpi(type,'gsa')
if options_.opt_gsa.pprior
MhDirectoryName = CheckPath(['GSA' filesep 'prior']);
MhDirectoryName = CheckPath(['gsa' filesep 'prior']);
else
MhDirectoryName = CheckPath(['GSA' filesep 'mc']);
MhDirectoryName = CheckPath(['gsa' filesep 'mc']);
end
else
MhDirectoryName = CheckPath('prior');
......
......@@ -51,13 +51,13 @@ else
MhDirectoryName = [CheckPath('metropolis') filesep ];
elseif strcmpi(type2,'gsa')
if options_.opt_gsa.morris==1,
MhDirectoryName = [CheckPath('GSA\SCREEN') filesep ];
MhDirectoryName = [CheckPath('gsa/screen') filesep ];
elseif options_.opt_gsa.morris==2,
MhDirectoryName = [CheckPath('GSA\IDENTIF') filesep ];
MhDirectoryName = [CheckPath('gsa/identif') filesep ];
elseif options_.opt_gsa.pprior
MhDirectoryName = [CheckPath(['GSA' filesep 'prior']) filesep ];
MhDirectoryName = [CheckPath(['gsa' filesep 'prior']) filesep ];
else
MhDirectoryName = [CheckPath(['GSA' filesep 'mc']) filesep ];
MhDirectoryName = [CheckPath(['gsa' filesep 'mc']) filesep ];
end
else
MhDirectoryName = [CheckPath('prior') filesep ];
......
......@@ -61,7 +61,7 @@ options_ident = set_default_option(options_ident,'advanced',0);
options_ident = set_default_option(options_ident,'normalize_jacobians',1);
options_ident = set_default_option(options_ident,'lik_init',1);
if options_ident.gsa_sample_file,
GSAFolder = checkpath('GSA');
GSAFolder = checkpath('gsa');
if options_ident.gsa_sample_file==1,
load([GSAFolder,filesep,fname_,'_prior'],'lpmat','lpmat0','istable');
elseif options_ident.gsa_sample_file==2,
......
......@@ -136,12 +136,12 @@ if options_gsa.morris==1 || options_gsa.morris==3,
options_gsa.ksstat=1;
if options_gsa.morris==3,
options_gsa = set_default_option(options_gsa,'Nsam',256);
OutputDirectoryName = CheckPath('GSA/IDENTIF');
OutputDirectoryName = CheckPath('gsa/identif');
else
OutputDirectoryName = CheckPath('GSA/SCREEN');
OutputDirectoryName = CheckPath('gsa/screen');
end
else
OutputDirectoryName = CheckPath('GSA');
OutputDirectoryName = CheckPath('gsa');
end
options_.opt_gsa = options_gsa;
......
......@@ -97,10 +97,10 @@ 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,
......
......@@ -21,7 +21,7 @@ function gsa_plotmatrix(type,varargin)
global bayestopt_ options_ M_
RootDirectoryName = CheckPath('GSA');
RootDirectoryName = CheckPath('gsa');
if options_.opt_gsa.pprior
load([ RootDirectoryName filesep M_.fname '_prior.mat'],'lpmat0','lpmat','istable','iunstable','iindeterm','iwrong')
......
......@@ -173,7 +173,7 @@ end
% yt = yt(:,j0);
if opt_gsa.morris==1,
%OutputDir = CheckPath('GSA/SCREEN');
%OutputDir = CheckPath('gsa/screen');
if ~isempty(vdec),
if opt_gsa.load_ident_files==0,
SAMorris = [];
......
......@@ -86,12 +86,12 @@ if strcmpi(type,'posterior')
B = min(1200, round(0.25*NumberOfDraws));
end
elseif strcmpi(type,'gsa')
RootDirectoryName = CheckPath('GSA');
RootDirectoryName = CheckPath('gsa');
if options_.opt_gsa.pprior
DirectoryName = CheckPath(['GSA',filesep,'prior']);
DirectoryName = CheckPath(['gsa',filesep,'prior']);
load([ RootDirectoryName filesep M_.fname '_prior.mat'],'lpmat0','lpmat','istable')
else
DirectoryName = CheckPath(['GSA',filesep,'mc']);
DirectoryName = CheckPath(['gsa',filesep,'mc']);
load([ RootDirectoryName filesep M_.fname '_mc.mat'],'lpmat0','lpmat','istable')
end
x=[lpmat0(istable,:) lpmat(istable,:)];
......
......@@ -100,9 +100,9 @@ if strcmpi(type,'posterior')
DirectoryName = CheckPath('metropolis');
elseif strcmpi(type,'gsa')
if options_.opt_gsa.pprior
DirectoryName = CheckPath(['GSA',filesep,'prior']);
DirectoryName = CheckPath(['gsa',filesep,'prior']);
else
DirectoryName = CheckPath(['GSA',filesep,'mc']);
DirectoryName = CheckPath(['gsa',filesep,'mc']);
end
elseif strcmpi(type,'prior')
DirectoryName = CheckPath('prior');
......
......@@ -162,8 +162,8 @@ disp('Press ENTER to continue'); pause(5);
// run this to generate posterior mode and Metropolis files if not yet done
estimation(datafile=data_ca1,first_obs=8,nobs=79,mh_nblocks=2,
prefilter=1,mh_jscale=0.5,mh_replic=100000, mode_compute=4, nograph, mh_drop=0.6,
bayesian_irf, filtered_vars, smoother);
prefilter=1,mh_jscale=0.5,mh_replic=5000, mode_compute=4, nograph, mh_drop=0.6,
bayesian_irf, filtered_vars, smoother) y_obs R_obs pie_obs dq de;
// run this to produce posterior samples of filtered, smoothed and irf variables, if not yet done
......
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