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