Commit 2a8a507b authored by michel's avatar michel
Browse files

tentative bug correction in DsgeLikelihood when stochastic trends are...

tentative bug correction in DsgeLikelihood when stochastic trends are unobservable (QR instead of SVN)


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2122 ac1d8469-bf42-47a9-8791-bf33cf982152
parent 74fb2cb0
......@@ -241,10 +241,12 @@ function [fval,cost_flag,ys,trend_coeff,info] = DsgeLikelihood(xparam1,gend,data
Z = QT(mf,:);
R1 = QT'*R;
[u,s,v]=svd(Z*ST(:,1:nk),0);
k = find(abs(diag(s)) < 1e-8);
% [u,s,v]=svd(Z*ST(:,1:nk),0);
[QQ,RR,EE] = qr(Z*ST(:,1:nk));
k = find(abs(diag(RR)) < 1e-8);
if length(k) > 0
[junk,k1] = max(abs(v(:,k)));
[k1,junk] = find(EE(:,k));
% [junk,k1] = max(abs(v(:,k)));
dd =ones(nk,1);
dd(k1) = zeros(length(k1),1);
Pinf(1:nk,1:nk) = diag(dd);
......
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