bug correction in partial_information

time-shift
Michel Juillard 2010-03-24 10:35:30 +01:00
parent 7668bc4a11
commit a9ce1ef2b4
2 changed files with 5 additions and 5 deletions

View File

@ -29,7 +29,7 @@ function [irfmat,irfst]=PCL_Part_info_irf( H, varobs, M_, dr, irfpers,ii)
% The jump variables have dimension NETA
OBS = ismember(varobs,M_.endo_names);
[junk,OBS] = ismember(varobs,M_.endo_names,'rows');
G1=dr.PI_ghx;
impact=dr.PI_ghu;
@ -42,7 +42,7 @@ function [irfmat,irfst]=PCL_Part_info_irf( H, varobs, M_, dr, irfpers,ii)
NOBS=NY;
LL=eye(NY,NY);
else %and if no obsevations specify OBS=[0] but this is not going to work properly
NOBS=size(find(OBS),2);
NOBS=length(OBS);
LL=zeros(NOBS,NY);
for i=1:NOBS
LL(i,OBS(i))=1;

View File

@ -1,4 +1,4 @@
function [irfmat,irfst]=PCL_Part_info_irf( H, varobs, dr,ivar)
function [irfmat,irfst]=PCL_Part_info_moments( H, varobs, dr,ivar)
% sets up parameters and calls part-info kalman filter
% developed by G Perendia, July 2006 for implementation from notes by Prof. Joe Pearlman to
% suit partial information RE solution in accordance with, and based on, the
@ -31,7 +31,7 @@ function [irfmat,irfst]=PCL_Part_info_irf( H, varobs, dr,ivar)
warning_old_state = warning;
warning off
OBS = ismember(varobs,M_.endo_names);
[junk,OBS] = ismember(varobs,M_.endo_names,'rows');
G1=dr.PI_ghx;
impact=dr.PI_ghu;
@ -45,7 +45,7 @@ function [irfmat,irfst]=PCL_Part_info_irf( H, varobs, dr,ivar)
NOBS=NY;
LL=eye(NY,NY);
else %and if no obsevations specify OBS=[0] but this is not going to work properly
NOBS=size(find(OBS),2);
NOBS=length(OBS);
LL=zeros(NOBS,NY);
for i=1:NOBS
LL(i,OBS(i))=1;