1) Detailed Sensitivity plots moved under the advanced option;
2) Fixes around saving figures;time-shift
parent
58dc9557d9
commit
338fdf216c
|
@ -52,7 +52,7 @@ siLREnorm = idelre.siLREnorm;
|
||||||
% else
|
% else
|
||||||
% tittxt = '';
|
% tittxt = '';
|
||||||
% end
|
% end
|
||||||
|
tittxt1=regexprep(tittxt, ' ', '_');
|
||||||
if SampleSize == 1,
|
if SampleSize == 1,
|
||||||
siJ = idemoments.siJ;
|
siJ = idemoments.siJ;
|
||||||
normJ = max(abs(siJ)')';
|
normJ = max(abs(siJ)')';
|
||||||
|
@ -69,38 +69,59 @@ if SampleSize == 1,
|
||||||
end
|
end
|
||||||
legend('relative to param value','relative to prior std','Location','Best')
|
legend('relative to param value','relative to prior std','Location','Best')
|
||||||
if idehess.flag_score,
|
if idehess.flag_score,
|
||||||
title('Identification strength in the asymptotic Information matrix (log-scale)')
|
title('Identification strength with asymptotic Information matrix (log-scale)')
|
||||||
else
|
else
|
||||||
title('Identification strength in the moments (log-scale)')
|
title('Identification strength with moments Information matrix (log-scale)')
|
||||||
end
|
end
|
||||||
|
|
||||||
subplot(212)
|
subplot(212)
|
||||||
|
bar(log([idehess.deltaM(is) idehess.deltaM_prior(is)]))
|
||||||
mmm = (siJnorm)'./max(siJnorm);
|
|
||||||
if advanced,
|
|
||||||
mmm1 = (siHnorm)'./max(siHnorm);
|
|
||||||
mmm=[mmm mmm1];
|
|
||||||
mmm1 = (siLREnorm)'./max(siLREnorm);
|
|
||||||
offset=length(siHnorm)-length(siLREnorm);
|
|
||||||
mmm1 = [NaN(offset,1); mmm1];
|
|
||||||
mmm=[mmm mmm1];
|
|
||||||
end
|
|
||||||
|
|
||||||
bar(mmm(is,:))
|
|
||||||
set(gca,'xlim',[0 nparam+1])
|
set(gca,'xlim',[0 nparam+1])
|
||||||
set(gca,'xticklabel','')
|
set(gca,'xticklabel','')
|
||||||
dy = get(gca,'ylim');
|
dy = get(gca,'ylim');
|
||||||
for ip=1:nparam,
|
for ip=1:nparam,
|
||||||
text(ip,dy(1),name{is(ip)},'rotation',90,'HorizontalAlignment','right','interpreter','none')
|
text(ip,dy(1),name{is(ip)},'rotation',90,'HorizontalAlignment','right','interpreter','none')
|
||||||
end
|
end
|
||||||
if advanced,
|
legend('relative to param value','relative to prior std','Location','Best')
|
||||||
legend('Moments','Model','LRE model','Location','Best')
|
if idehess.flag_score,
|
||||||
|
title('Sensitivity component with asymptotic Information matrix (log-scale)')
|
||||||
|
else
|
||||||
|
title('Sensitivity component with moments Information matrix (log-scale)')
|
||||||
end
|
end
|
||||||
title('Sensitivity bars')
|
saveas(gcf,[IdentifDirectoryName,'/',M_.fname,'_ident_strength_',tittxt1])
|
||||||
|
eval(['print -depsc2 ' IdentifDirectoryName '/' M_.fname '_ident_strength_' tittxt1]);
|
||||||
|
eval(['print -dpdf ' IdentifDirectoryName '/' M_.fname '_ident_strength_' tittxt1]);
|
||||||
|
|
||||||
if advanced
|
if advanced,
|
||||||
disp(' ')
|
disp(' ')
|
||||||
disp('Press ENTER to display advanced diagnostics'), pause,
|
disp('Press ENTER to display advanced diagnostics'), pause,
|
||||||
|
figure('Name',[tittxt, ' - Sensitivity plot']),
|
||||||
|
subplot(211)
|
||||||
|
mmm = (siJnorm)'./max(siJnorm);
|
||||||
|
mmm1 = (siHnorm)'./max(siHnorm);
|
||||||
|
mmm=[mmm mmm1];
|
||||||
|
mmm1 = (siLREnorm)'./max(siLREnorm);
|
||||||
|
offset=length(siHnorm)-length(siLREnorm);
|
||||||
|
mmm1 = [NaN(offset,1); mmm1];
|
||||||
|
mmm=[mmm mmm1];
|
||||||
|
|
||||||
|
bar(log(mmm(is,:).*100))
|
||||||
|
set(gca,'xlim',[0 nparam+1])
|
||||||
|
set(gca,'xticklabel','')
|
||||||
|
dy = get(gca,'ylim');
|
||||||
|
for ip=1:nparam,
|
||||||
|
text(ip,dy(1),name{is(ip)},'rotation',90,'HorizontalAlignment','right','interpreter','none')
|
||||||
|
end
|
||||||
|
if advanced,
|
||||||
|
legend('Moments','Model','LRE model','Location','Best')
|
||||||
|
end
|
||||||
|
title('Sensitivity bars using derivatives (log-scale)')
|
||||||
|
if save_figure
|
||||||
|
saveas(gcf,[IdentifDirectoryName,'/',M_.fname,'_sensitivity_',tittxt1])
|
||||||
|
eval(['print -depsc2 ' IdentifDirectoryName '/' M_.fname '_sensitivity_' tittxt1]);
|
||||||
|
eval(['print -dpdf ' IdentifDirectoryName '/' M_.fname '_sensitivity_' tittxt1]);
|
||||||
|
end
|
||||||
|
|
||||||
% identificaton patterns
|
% identificaton patterns
|
||||||
for j=1:size(idemoments.cosnJ,2),
|
for j=1:size(idemoments.cosnJ,2),
|
||||||
pax=NaN(nparam,nparam);
|
pax=NaN(nparam,nparam);
|
||||||
|
@ -138,10 +159,11 @@ if SampleSize == 1,
|
||||||
end
|
end
|
||||||
set(gca,'xgrid','on')
|
set(gca,'xgrid','on')
|
||||||
set(gca,'ygrid','on')
|
set(gca,'ygrid','on')
|
||||||
|
xlabel([tittxt,' - Collinearity patterns with ', int2str(j) ,' parameter(s)'])
|
||||||
if save_figure
|
if save_figure
|
||||||
saveas(gcf,[IdentifDirectoryName,'/',M_.fname,'_ident_collinearity_', int2str(j)])
|
saveas(gcf,[IdentifDirectoryName,'/',M_.fname,'_ident_collinearity_', tittxt1, '_', int2str(j)])
|
||||||
eval(['print -depsc2 ' IdentifDirectoryName '/' M_.fname '_ident_collinearity_', int2str(j)]);
|
eval(['print -depsc ' IdentifDirectoryName '/' M_.fname '_ident_collinearity_' tittxt1 '_' int2str(j)]);
|
||||||
eval(['print -dpdf ' IdentifDirectoryName '/' M_.fname '_ident_collinearity_', int2str(j)]);
|
eval(['print -dpdf ' IdentifDirectoryName '/' M_.fname '_ident_collinearity_' tittxt1 '_' int2str(j)]);
|
||||||
if options_.nograph, close(gcf); end
|
if options_.nograph, close(gcf); end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -189,20 +211,21 @@ if SampleSize == 1,
|
||||||
end
|
end
|
||||||
if save_figure,
|
if save_figure,
|
||||||
figure(f1);
|
figure(f1);
|
||||||
saveas(f1,[IdentifDirectoryName,'/',M_.fname,'_ident_pattern_1'])
|
saveas(f1,[IdentifDirectoryName,'/',M_.fname,'_ident_pattern_',tittxt1,'_1'])
|
||||||
eval(['print -depsc2 ' IdentifDirectoryName '/' M_.fname '_ident_pattern_1']);
|
eval(['print -depsc2 ' IdentifDirectoryName '/' M_.fname '_ident_pattern_' tittxt1 '_1']);
|
||||||
eval(['print -dpdf ' IdentifDirectoryName '/' M_.fname '_ident_pattern_1']);
|
eval(['print -dpdf ' IdentifDirectoryName '/' M_.fname '_ident_pattern_' tittxt1 '_1']);
|
||||||
if nparam>4,
|
if nparam>4,
|
||||||
figure(f2),
|
figure(f2),
|
||||||
saveas(f2,[IdentifDirectoryName,'/',M_.fname,'_ident_pattern_2'])
|
saveas(f2,[IdentifDirectoryName,'/',M_.fname,'_ident_pattern_',tittxt1,'_2'])
|
||||||
eval(['print -depsc2 ' IdentifDirectoryName '/' M_.fname '_ident_pattern_2']);
|
eval(['print -depsc2 ' IdentifDirectoryName '/' M_.fname '_ident_pattern_' tittxt1 '_2']);
|
||||||
eval(['print -dpdf ' IdentifDirectoryName '/' M_.fname '_ident_pattern_2']);
|
eval(['print -dpdf ' IdentifDirectoryName '/' M_.fname '_ident_pattern_' tittxt1 '_2']);
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
figure('Name',['MC sensitivities']),
|
figure('Name',['MC sensitivities']),
|
||||||
|
subplot(211)
|
||||||
mmm = (idehess.ide_strength_J);
|
mmm = (idehess.ide_strength_J);
|
||||||
[ss, is] = sort(mmm);
|
[ss, is] = sort(mmm);
|
||||||
mmm = mean(siJnorm)';
|
mmm = mean(siJnorm)';
|
||||||
|
@ -227,6 +250,10 @@ else
|
||||||
legend('Moments','Model','LRE model','Location','Best')
|
legend('Moments','Model','LRE model','Location','Best')
|
||||||
end
|
end
|
||||||
title('MC mean of sensitivity measures')
|
title('MC mean of sensitivity measures')
|
||||||
|
saveas(gcf,[IdentifDirectoryName,'/',M_.fname,'_MC_sensitivity'])
|
||||||
|
eval(['print -depsc2 ' IdentifDirectoryName '/' M_.fname '_MC_sensitivity']);
|
||||||
|
eval(['print -dpdf ' IdentifDirectoryName '/' M_.fname '_MC_sensitivity']);
|
||||||
|
if options_.nograph, close(gcf); end
|
||||||
if advanced,
|
if advanced,
|
||||||
disp(' ')
|
disp(' ')
|
||||||
disp('Press ENTER to display advanced diagnostics'), pause,
|
disp('Press ENTER to display advanced diagnostics'), pause,
|
||||||
|
|
Loading…
Reference in New Issue