Skip to content
Snippets Groups Projects
Commit b0e7c47a authored by Marco Ratto's avatar Marco Ratto
Browse files

fixed bug with non-increasing time declarations of moment restrictions....

fixed bug with non-increasing time declarations of moment restrictions. Modified example to get more sensible graph of ACF.
parent 0f8c5ef2
Branches
Tags
No related merge requests found
...@@ -394,6 +394,7 @@ if ~isempty(indx_moment) ...@@ -394,6 +394,7 @@ if ~isempty(indx_moment)
% For single legend search which has maximum nbr of restrictions % For single legend search which has maximum nbr of restrictions
maxijv=0; maxijv=0;
for ij=1:nbr_moment_restrictions for ij=1:nbr_moment_restrictions
endo_prior_restrictions.moment{ij,3} = sort(endo_prior_restrictions.moment{ij,3});
if length(endo_prior_restrictions.moment{ij,3})>maxijv if length(endo_prior_restrictions.moment{ij,3})>maxijv
maxij=ij;maxijv=length(endo_prior_restrictions.moment{ij,3}); maxij=ij;maxijv=length(endo_prior_restrictions.moment{ij,3});
end end
...@@ -477,6 +478,7 @@ if ~isempty(indx_moment) ...@@ -477,6 +478,7 @@ if ~isempty(indx_moment)
% end % end
end end
for ij=1:nbr_moment_couples for ij=1:nbr_moment_couples
time_matrix{ij} = sort(time_matrix{ij});
if length(time_matrix{ij})>1 if length(time_matrix{ij})>1
if ~DynareOptions.nograph if ~DynareOptions.nograph
itmp = (find(plot_indx==ij)); itmp = (find(plot_indx==ij));
...@@ -505,7 +507,7 @@ if ~isempty(indx_moment) ...@@ -505,7 +507,7 @@ if ~isempty(indx_moment)
hold off hold off
axis(a) axis(a)
box on box on
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 end
......
...@@ -88,7 +88,7 @@ end; ...@@ -88,7 +88,7 @@ end;
moment_calibration; moment_calibration;
//y_obs,y_obs, [0.8 1.1]; //[unconditional variance] //y_obs,y_obs, [0.8 1.1]; //[unconditional variance]
y_obs,y_obs(-(1:4)), +; //[first year acf] y_obs,y_obs(1:4), +; //[first year acf]
//y_obs,pie_obs(-4:4), -; //[ccf] //y_obs,pie_obs(-4:4), -; //[ccf]
@#for ilag in -2:2 @#for ilag in -2:2
y_obs,R_obs(@{ilag}), -; //[ccf] y_obs,R_obs(@{ilag}), -; //[ccf]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment