distinguishing between noprint and nomoments/nocorr options

git-svn-id: https://www.dynare.org/svn/dynare/trunk@3359 ac1d8469-bf42-47a9-8791-bf33cf982152
time-shift
ratto 2010-01-15 09:55:05 +00:00
parent 4a3709da09
commit a018e231de
1 changed files with 16 additions and 13 deletions

View File

@ -52,7 +52,7 @@ z = [ m sd s2 ];
oo_.mean = m; oo_.mean = m;
oo_.var = oo_.gamma_y{1}; oo_.var = oo_.gamma_y{1};
if options_.nomoments == 0 if ~options_.noprint %options_.nomoments == 0
title='THEORETICAL MOMENTS'; title='THEORETICAL MOMENTS';
if options_.hp_filter if options_.hp_filter
title = [title ' (HP filter, lambda = ' int2str(options_.hp_filter) ')']; title = [title ' (HP filter, lambda = ' int2str(options_.hp_filter) ')'];
@ -85,6 +85,8 @@ if options_.nomoments == 0
end end
if options_.nocorr == 0 if options_.nocorr == 0
corr = oo_.gamma_y{1}(i1,i1)./(sd(i1)*sd(i1)');
if ~options_.noprint,
disp(' ') disp(' ')
title='MATRIX OF CORRELATIONS'; title='MATRIX OF CORRELATIONS';
if options_.hp_filter if options_.hp_filter
@ -92,12 +94,17 @@ if options_.nocorr == 0
end end
labels = deblank(M_.endo_names(ivar(i1),:)); labels = deblank(M_.endo_names(ivar(i1),:));
headers = strvcat('Variables',labels); headers = strvcat('Variables',labels);
corr = oo_.gamma_y{1}(i1,i1)./(sd(i1)*sd(i1)');
lh = size(labels,2)+2; lh = size(labels,2)+2;
dyntable(title,headers,labels,corr,lh,8,4); dyntable(title,headers,labels,corr,lh,8,4);
end end
end
if options_.ar > 0 if options_.ar > 0
z=[];
for i=1:options_.ar
oo_.autocorr{i} = oo_.gamma_y{i+1};
z(:,i) = diag(oo_.gamma_y{i+1}(i1,i1));
end
if ~options_.noprint,
disp(' ') disp(' ')
title='COEFFICIENTS OF AUTOCORRELATION'; title='COEFFICIENTS OF AUTOCORRELATION';
if options_.hp_filter if options_.hp_filter
@ -105,11 +112,7 @@ if options_.ar > 0
end end
labels = deblank(M_.endo_names(ivar(i1),:)); labels = deblank(M_.endo_names(ivar(i1),:));
headers = strvcat('Order ',int2str([1:options_.ar]')); headers = strvcat('Order ',int2str([1:options_.ar]'));
z=[];
for i=1:options_.ar
oo_.autocorr{i} = oo_.gamma_y{i+1};
z(:,i) = diag(oo_.gamma_y{i+1}(i1,i1));
end
lh = size(labels,2)+2; lh = size(labels,2)+2;
dyntable(title,headers,labels,z,lh,8,4); dyntable(title,headers,labels,z,lh,8,4);
end end
end