Commit a0c021ef authored by ratto's avatar ratto
Browse files

Use correlations to compute linear combinations weakly identified.

git-svn-id: https://www.dynare.org/svn/dynare/trunk@2992 ac1d8469-bf42-47a9-8791-bf33cf982152
parent 643551ce
......@@ -26,15 +26,22 @@ indnoH = {};
indnoJ = {};
ind1 = find(vnorm(H)~=0);
H1 = H(:,ind1);
[e1,e2] = eig(H1'*H1);
eH = NaN(npar,1);
eH(ind1) = e1(:,1);
covH = H1'*H1;
sdH = sqrt(diag(covH));
sdH = sdH*sdH';
[e1,e2] = eig( (H1'*H1)./sdH );
eH = NaN(npar,length(ind1));
eH(ind1,:) = e1;
condH = cond(H1'*H1);
ind2 = find(vnorm(JJ)~=0);
JJ1 = JJ(:,ind2);
[ee1,ee2] = eig(JJ1'*JJ1);
eJ = NaN(npar,1);
eJ(ind2) = ee1(:,1);
covJJ = JJ1'*JJ1;
sdJJ = sqrt(diag(covJJ));
sdJJ = sdJJ*sdJJ';
[ee1,ee2] = eig( (JJ1'*JJ1)./sdJJ );
eJ = NaN(npar,length(ind2));
eJ(ind2,:) = ee1;
condJ = cond(JJ1'*JJ1);
if rank(H)<npar
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment