Commit a79a7ccf authored by rattoma's avatar rattoma
Browse files

Bug fix with morris option >0 required by preprocessor!

git-svn-id: file:///home/sebastien/dynare/gsa_dyn@105 f1850c17-3b45-254b-b221-fcb05880fee1
parent fd1606b2
......@@ -34,7 +34,7 @@ if opt_gsa.load_ident==0,
[vdec, cc, ac] = mc_moments(T, lpmatx, oo_.dr);
if opt_gsa.morris<=0,
if opt_gsa.morris~=1,
[pdraws, TAU, GAM, H, JJ] = dynare_identification(-[1:npT],[lpmatx lpmat(istable,:)]);
if max(max(abs(pdraws-[lpmatx lpmat(istable,:)])))==0,
disp('Sample check OK'),
......@@ -128,7 +128,7 @@ if opt_gsa.load_ident==0,
[yt, j0]=teff(A,Nsam,istable);
if opt_gsa.morris<=0,
if opt_gsa.morris~=1,
if max(max(abs(TAU-yt(istable,:)')))<= 1.e-10,
disp('Model check OK'),
clear TAU A
......@@ -736,7 +736,7 @@ if opt_gsa.morris==1,
% eval(['print -depsc2 ' OutputDirectoryName '/' fname_ '_morris_redform']);
% eval(['print -dpdf ' OutputDirectoryName '/' fname_ '_morris_redform']);
elseif opt_gsa.morris==2,
elseif opt_gsa.morris==3,
np=estim_params_.np;
na=(4*np+1)*opt_gsa.Nsam;
for j=1:j0,
......@@ -791,7 +791,7 @@ elseif opt_gsa.morris==2,
figure, bar((idex_pcr.*ys_pcr)./opt_gsa.Nsam), title('Relationships rank PCA')
figure, bar((idex_pcr.*ys_pcr)'./opt_gsa.Nsam), title('Parameters rank PCA')
elseif opt_gsa.morris==-1, % ISKREV staff
elseif opt_gsa.morris==2, % ISKREV staff
else, % main effects analysis
......
......@@ -104,17 +104,15 @@ if fload==0,
end
yys=zeros(length(dr_.ys),Nsam);
if opt_gsa.morris>0
if opt_gsa.morris == 1
[lpmat, OutFact] = Sampling_Function_2(nliv, np+nshock, ntra, ones(np+nshock, 1), zeros(np+nshock,1), []);
lpmat = lpmat.*(nliv-1)/nliv+1/nliv/2;
Nsam=size(lpmat,1);
lpmat0 = lpmat(:,1:nshock);
lpmat = lpmat(:,nshock+1:end);
elseif opt_gsa.morris==2
lpmat = prep_ide(Nsam,np,5);
Nsam=size(lpmat,1);
end
if opt_gsa.morris == 1
[lpmat, OutFact] = Sampling_Function_2(nliv, np+nshock, ntra, ones(np+nshock, 1), zeros(np+nshock,1), []);
lpmat = lpmat.*(nliv-1)/nliv+1/nliv/2;
Nsam=size(lpmat,1);
lpmat0 = lpmat(:,1:nshock);
lpmat = lpmat(:,nshock+1:end);
elseif opt_gsa.morris==3,
lpmat = prep_ide(Nsam,np,5);
Nsam=size(lpmat,1);
else
if np<52 & ilptau>0,
[lpmat] = lptauSEQ(Nsam,np); % lptau
......
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