Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dynare
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
122
Issues
122
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dynare
dynare
Commits
c6c9b4e3
Commit
c6c9b4e3
authored
Jan 22, 2021
by
Johannes Pfeifer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kalman_filter.m: fix bug when using analytic_derivation
parent
78a4bca3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
matlab/kalman/likelihood/kalman_filter.m
matlab/kalman/likelihood/kalman_filter.m
+3
-3
matlab/kalman/likelihood/kalman_filter_fast.m
matlab/kalman/likelihood/kalman_filter_fast.m
+2
-2
No files found.
matlab/kalman/likelihood/kalman_filter.m
View file @
c6c9b4e3
...
...
@@ -53,7 +53,7 @@ function [LIK, LIKK, a, P] = kalman_filter(Y,start,last,a,P,kalman_tol,riccati_t
%!
@table
@
@var
%!
@item
LIK
%!
Double
scalar
,
value
of
(
minus
)
the
likelihood
.
%!
@item
likk
%!
@item
LIKK
%!
Column
vector
of
doubles
,
values
of
the
density
of
each
observation
.
%!
@item
a
%!
Vector
(
@var
{
mm
}
*
1
)
of
doubles
,
mean
of
the
state
vector
at
the
end
of
the
(
sub
)
sample
.
...
...
@@ -254,9 +254,9 @@ end
if
t
<=
last
if
analytic_derivation
if
analytic_derivation
==
2
[
tmp
,
tmp2
]
=
kalman_filter_ss
(
Y
,
t
,
last
,
a
,
T
,
K
,
iF
,
dF
,
Z
,
pp
,
Zflag
,
analytic_derivation
,
Da
,
DT
,
DYss
,
D2a
,
D2T
,
D2Yss
);
[
tmp
,
tmp2
]
=
kalman_filter_ss
(
Y
,
t
,
last
,
a
,
T
,
K
,
iF
,
log_
dF
,
Z
,
pp
,
Zflag
,
analytic_derivation
,
Da
,
DT
,
DYss
,
D2a
,
D2T
,
D2Yss
);
else
[
tmp
,
tmp2
]
=
kalman_filter_ss
(
Y
,
t
,
last
,
a
,
T
,
K
,
iF
,
dF
,
Z
,
pp
,
Zflag
,
analytic_derivation
,
Da
,
DT
,
DYss
,
asy_hess
);
[
tmp
,
tmp2
]
=
kalman_filter_ss
(
Y
,
t
,
last
,
a
,
T
,
K
,
iF
,
log_
dF
,
Z
,
pp
,
Zflag
,
analytic_derivation
,
Da
,
DT
,
DYss
,
asy_hess
);
end
likk
(
s
+
1
:
end
)
=
tmp2
{
1
};
dlikk
(
s
+
1
:
end
,
:
)
=
tmp2
{
2
};
...
...
matlab/kalman/likelihood/kalman_filter_fast.m
View file @
c6c9b4e3
...
...
@@ -209,10 +209,10 @@ end
if
t
<=
last
if
analytic_derivation
if
analytic_derivation
==
2
[
tmp
,
tmp2
]
=
kalman_filter_ss
(
Y
,
t
,
last
,
a
,
T
,
K
,
iF
,
dF
,
Z
,
pp
,
Zflag
,
...
[
tmp
,
tmp2
]
=
kalman_filter_ss
(
Y
,
t
,
last
,
a
,
T
,
K
,
iF
,
log
(
dF
)
,
Z
,
pp
,
Zflag
,
...
analytic_derivation
,
Da
,
DT
,
DYss
,
D2a
,
D2T
,
D2Yss
);
else
[
tmp
,
tmp2
]
=
kalman_filter_ss
(
Y
,
t
,
last
,
a
,
T
,
K
,
iF
,
dF
,
Z
,
pp
,
Zflag
,
...
[
tmp
,
tmp2
]
=
kalman_filter_ss
(
Y
,
t
,
last
,
a
,
T
,
K
,
iF
,
log
(
dF
)
,
Z
,
pp
,
Zflag
,
...
analytic_derivation
,
Da
,
DT
,
DYss
,
asy_hess
);
end
likk
(
s
+
1
:
end
)
=
tmp2
{
1
};
...
...
Write
Preview
Markdown
is supported
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