Skip to content
Snippets Groups Projects
Commit c5cb3009 authored by Stéphane Adjemian's avatar Stéphane Adjemian Committed by Stéphane Adjemian
Browse files

Merge pull request #1462 from JohannesPfeifer/contemp_corr

Make sure oo_.contemporaneous_correlation has same dimensions as othe…
parent f1142c5c
Branches
Tags
No related merge requests found
......@@ -123,8 +123,9 @@ if length(i1) == 0
end
if options_.nocorr == 0 && size(stationary_vars, 1) > 0
corr = oo_.gamma_y{1}(i1,i1)./(sd(i1)*sd(i1)');
if options_.contemporaneous_correlation
corr=NaN(size(oo_.gamma_y{1}));
corr(i1,i1) = oo_.gamma_y{1}(i1,i1)./(sd(i1)*sd(i1)');
if options_.contemporaneous_correlation
oo_.contemporaneous_correlation = corr;
end
if ~options_.noprint
......@@ -138,12 +139,12 @@ if options_.nocorr == 0 && size(stationary_vars, 1) > 0
labels = deblank(M_.endo_names(ivar(i1),:));
headers = char('Variables',labels);
lh = size(labels,2)+2;
dyntable(options_,title,headers,labels,corr,lh,8,4);
dyntable(options_,title,headers,labels,corr(i1,i1),lh,8,4);
if options_.TeX
labels = deblank(M_.endo_names_tex(ivar(i1),:));
headers=char('Variables',labels);
lh = size(labels,2)+2;
dyn_latex_table(M_,options_,title,'th_corr_matrix',headers,labels,corr,lh,8,4);
dyn_latex_table(M_,options_,title,'th_corr_matrix',headers,labels,corr(i1,i1),lh,8,4);
end
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment