Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mark Song
dynare
Commits
b9741548
Commit
b9741548
authored
Nov 16, 2017
by
Marco Ratto
Committed by
Stéphane Adjemian
Jan 26, 2018
Browse files
As we do for the smoother, check the rank of Pinf only for the observables (i.e. using Z*Pinf*Z')
parent
cf8213f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
matlab/kalman/likelihood/kalman_filter_d.m
View file @
b9741548
...
...
@@ -65,7 +65,7 @@ dLIK = Inf; % Default value of the log likelihood.
oldK
=
Inf
;
s
=
0
;
while
rank
(
Pinf
,
diffuse_kalman_tol
)
&&
(
t
<=
last
)
while
rank
(
Z
*
Pinf
*
Z
'
,
diffuse_kalman_tol
)
&&
(
t
<=
last
)
s
=
t
-
start
+
1
;
v
=
Y
(:,
t
)
-
Z
*
a
;
%get prediction error v^(0) in (5.13) DK (2012)
Finf
=
Z
*
Pinf
*
Z
'
;
% (5.7) in DK (2012)
...
...
matlab/kalman/likelihood/univariate_kalman_filter_d.m
View file @
b9741548
...
...
@@ -154,7 +154,7 @@ while newRank && (t<=last)
end
end
if
newRank
oldRank
=
rank
(
Pinf
,
diffuse_kalman_tol
);
oldRank
=
rank
(
Z
*
Pinf
*
Z
'
,
diffuse_kalman_tol
);
else
oldRank
=
0
;
end
...
...
@@ -162,7 +162,7 @@ while newRank && (t<=last)
Pstar
=
T
*
Pstar
*
T
'
+
QQ
;
Pinf
=
T
*
Pinf
*
T
'
;
if
newRank
newRank
=
rank
(
Pinf
,
diffuse_kalman_tol
);
newRank
=
rank
(
Z
*
Pinf
*
Z
'
,
diffuse_kalman_tol
);
end
if
oldRank
~=
newRank
disp
(
'
univariate_diffuse_kalman_filter
::
T
does
influence
the
rank
of
Pinf
!
'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment