commit
00c317e109
|
@ -167,12 +167,14 @@ if ~isempty(indx_irf),
|
|||
iplot_indx = ones(size(plot_indx));
|
||||
|
||||
indx_irf = indx_irf(irestrictions,:);
|
||||
if ~DynareOptions.nograph,
|
||||
h1=dyn_figure(DynareOptions,'name',[type ' evaluation of irf restrictions']);
|
||||
nrow=ceil(sqrt(nbr_irf_couples));
|
||||
ncol=nrow;
|
||||
if nrow*(nrow-1)>nbr_irf_couples,
|
||||
ncol=nrow-1;
|
||||
end
|
||||
end
|
||||
for ij=1:nbr_irf_restrictions,
|
||||
mat_irf{ij}=mat_irf{ij}(irestrictions,:);
|
||||
irf_matrix{plot_indx(ij)} = [irf_matrix{plot_indx(ij)} mat_irf{ij}];
|
||||
|
@ -193,8 +195,8 @@ if ~isempty(indx_irf),
|
|||
aleg = [aleg,'-' ,num2str(endo_prior_restrictions.irf{ij,3}(end))];
|
||||
iplot_indx(ij)=0;
|
||||
end
|
||||
if length(time_matrix{plot_indx(ij)})==1,
|
||||
figure(h1),
|
||||
if ~DynareOptions.nograph && length(time_matrix{plot_indx(ij)})==1,
|
||||
set(0,'currentfigure',h1),
|
||||
subplot(nrow,ncol, plot_indx(ij)),
|
||||
hc = cumplot(mat_irf{ij}(:,ik));
|
||||
set(hc,'color','k','linewidth',2)
|
||||
|
@ -242,6 +244,7 @@ if ~isempty(indx_irf),
|
|||
end
|
||||
for ij=1:nbr_irf_couples,
|
||||
if length(time_matrix{ij})>1,
|
||||
if ~DynareOptions.nograph,
|
||||
figure(h1);
|
||||
subplot(nrow,ncol, ij)
|
||||
itmp = (find(plot_indx==ij));
|
||||
|
@ -269,9 +272,10 @@ if ~isempty(indx_irf),
|
|||
set(gca,'xtick',sort(time_matrix{ij}))
|
||||
itmp = min(itmp);
|
||||
title([endo_prior_restrictions.irf{itmp,1},' vs ',endo_prior_restrictions.irf{itmp,2}],'interpreter','none'),
|
||||
|
||||
end
|
||||
if any(iplot_indx.*plot_indx==ij),
|
||||
% MCF of the couples with logical AND
|
||||
itmp = min(find(plot_indx==ij));
|
||||
indx1 = find(indx_irf_matrix(:,ij)==0);
|
||||
indx2 = find(indx_irf_matrix(:,ij)~=0);
|
||||
leg = num2str(time_matrix{ij}(1));
|
||||
|
@ -293,7 +297,9 @@ if ~isempty(indx_irf),
|
|||
end
|
||||
end
|
||||
end
|
||||
if ~DynareOptions.nograph,
|
||||
dyn_saveas(h1,[OutputDirectoryName,filesep,fname_,'_',type,'_irf_restrictions'],DynareOptions);
|
||||
end
|
||||
|
||||
skipline()
|
||||
end
|
||||
|
@ -353,12 +359,14 @@ if ~isempty(indx_moment)
|
|||
iplot_indx = ones(size(plot_indx));
|
||||
|
||||
indx_moment = indx_moment(irestrictions,:);
|
||||
if ~DynareOptions.nograph,
|
||||
h2=dyn_figure(DynareOptions,'name',[type ' evaluation of moment restrictions']);
|
||||
nrow=ceil(sqrt(nbr_moment_couples));
|
||||
ncol=nrow;
|
||||
if nrow*(nrow-1)>nbr_moment_couples,
|
||||
ncol=nrow-1;
|
||||
end
|
||||
end
|
||||
|
||||
for ij=1:nbr_moment_restrictions,
|
||||
mat_moment{ij}=mat_moment{ij}(irestrictions,:);
|
||||
|
@ -425,9 +433,10 @@ if ~isempty(indx_moment)
|
|||
end
|
||||
for ij=1:nbr_moment_couples,
|
||||
if length(time_matrix{ij})>1,
|
||||
figure(h2);
|
||||
subplot(nrow,ncol, ij)
|
||||
if ~DynareOptions.nograph
|
||||
itmp = (find(plot_indx==ij));
|
||||
set(0,'currentfigure',h2);
|
||||
subplot(nrow,ncol, ij)
|
||||
plot(time_matrix{ij},[max(moment_matrix{ij})' min(moment_matrix{ij})'],'k--','linewidth',2)
|
||||
hold on,
|
||||
plot(time_matrix{ij},moment_median{ij},'k','linewidth',2)
|
||||
|
@ -452,8 +461,10 @@ if ~isempty(indx_moment)
|
|||
set(gca,'xtick',sort(time_matrix{ij}))
|
||||
itmp = min(itmp);
|
||||
title([endo_prior_restrictions.moment{itmp,1},' vs ',endo_prior_restrictions.moment{itmp,2}],'interpreter','none'),
|
||||
end
|
||||
if any(iplot_indx.*plot_indx==ij),
|
||||
% MCF of the couples with logical AND
|
||||
itmp = min(find(plot_indx==ij));
|
||||
indx1 = find(indx_moment_matrix(:,ij)==0);
|
||||
indx2 = find(indx_moment_matrix(:,ij)~=0);
|
||||
leg = num2str(time_matrix{ij}(1));
|
||||
|
@ -475,7 +486,10 @@ if ~isempty(indx_moment)
|
|||
end
|
||||
end
|
||||
end
|
||||
if ~DynareOptions.nograph,
|
||||
dyn_saveas(h2,[OutputDirectoryName,filesep,fname_,'_',type,'_moment_restrictions'],DynareOptions);
|
||||
end
|
||||
|
||||
skipline()
|
||||
end
|
||||
return
|
||||
|
|
|
@ -53,7 +53,7 @@ if length(ibeha)>10 && length(inobeha)>10,
|
|||
indcorr = indcorr(~ismember(indcorr(:),indmcf));
|
||||
indmcf = [indmcf(:); indcorr(:)];
|
||||
end
|
||||
if ~isempty(indmcf)
|
||||
if ~isempty(indmcf) && ~DynareOptions.nograph,
|
||||
skipline()
|
||||
scatter_mcf(lpmat(ibeha,indmcf),lpmat(inobeha,indmcf), param_names(indmcf,:), ...
|
||||
'.', [fname_,'_',amcf_name], OutputDirectoryName, amcf_title,[], DynareOptions, ...
|
||||
|
|
Loading…
Reference in New Issue