v4 ramsey_static.m: corrected bug when there are more than one instrument

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1463 ac1d8469-bf42-47a9-8791-bf33cf982152
time-shift
michel 2007-11-27 14:10:53 +00:00
parent a6cd92f574
commit fab7d08c0e
1 changed files with 3 additions and 1 deletions

View File

@ -52,7 +52,9 @@ function [resids, rJ,mult] = ramsey_static(x)
mult = -A\Uy;
% resids = [f; Uy(i_inst)+A(i_inst,:)*mult];
resids1 = Uy+A*mult;
resids = [f; sqrt(resids1'*resids1/endo_nbr)];
% resids = [f; sqrt(resids1'*resids1/endo_nbr)];
[q,r,e] = qr([A Uy]');
resids = [f; r(end,(endo_nbr-inst_nbr+1:end))'];
rJ = [];
return;