bug fix for the rare case where r2 does not change for some observable

time-shift
Marco Ratto 2017-02-06 18:11:59 +01:00 committed by Stéphane Adjemian (Charybdis)
parent 576b2d0f85
commit d1550293bf
1 changed files with 4 additions and 1 deletions

View File

@ -575,6 +575,8 @@ else
disp('These variables are excluded from SA') disp('These variables are excluded from SA')
disp('[Unless you treat these series as exogenous, there is something wrong in your estimation !]') disp('[Unless you treat these series as exogenous, there is something wrong in your estimation !]')
end end
vvarvecm0=vvarvecm;
ivar = find( std(rmse_MC)./mean(rmse_MC)>0.0001 ); ivar = find( std(rmse_MC)./mean(rmse_MC)>0.0001 );
vvarvecm=vvarvecm(ivar,:); vvarvecm=vvarvecm(ivar,:);
rmse_MC=rmse_MC(:,ivar); rmse_MC=rmse_MC(:,ivar);
@ -646,7 +648,7 @@ else
end end
%%%%% R2 table %%%%% R2 table
vvarvecm=vvarvecm0;
skipline() skipline()
title_string='R2 over the MC sample:'; title_string='R2 over the MC sample:';
data_mat=[min(r2_MC)' max(r2_MC)']; data_mat=[min(r2_MC)' max(r2_MC)'];
@ -658,6 +660,7 @@ else
end end
r2_MC=r2_MC(:,ivar); r2_MC=r2_MC(:,ivar);
vvarvecm=vvarvecm(ivar,:);
skipline() skipline()
disp(['Sample filtered the ',num2str(pfilt*100),'% best R2''s for each observed series ...' ]) disp(['Sample filtered the ',num2str(pfilt*100),'% best R2''s for each observed series ...' ])