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
Dynare
dynare
Commits
a05fa7e0
Commit
a05fa7e0
authored
Sep 21, 2017
by
Stéphane Adjemian
Browse files
Fixed bug in one sided HP filter.
User defined initial conditions for the trend were not acknowledge.
parent
27dd46da
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/one_sided_hp_filter.m
View file @
a05fa7e0
...
...
@@ -70,7 +70,7 @@ Q=[q,0;
R
=
1
;
% variance observation equation error
for
k
=
1
:
n
%Run the Kalman filter for each variable
if
nargin
<
4
||
isempty
(
x_user
)
%no intial value for state, extrapolate back two periods from the observations
if
nargin
<
3
||
isempty
(
x_user
)
%no intial value for state, extrapolate back two periods from the observations
x
=
[
2
*
y
(
1
,
k
)
-
y
(
2
,
k
);
3
*
y
(
1
,
k
)
-
2
*
y
(
2
,
k
)];
else
...
...
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