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
Johannes Pfeifer
dynare
Commits
869147c1
Commit
869147c1
authored
Jan 18, 2021
by
Johannes Pfeifer
Browse files
Kalman filter functions: clarify header comments
parent
78a4bca3
Pipeline
#4743
canceled with stages
in 55 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
matlab/kalman/likelihood/kalman_filter_d.m
View file @
869147c1
...
...
@@ -5,7 +5,7 @@ function [dLIK,dlik,a,Pstar] = kalman_filter_d(Y, start, last, a, Pinf, Pstar, k
% Y [double] pp*smpl matrix of (detrended) data, where pp is the number of observed variables.
% start [integer] scalar, first observation.
% last [integer] scalar, last observation.
% a [double] mm*1 vector, levels of the
state variables
.
% a [double] mm*1 vector, levels of the
predicted initial state variables (E_{0}(alpha_1))
.
% Pinf [double] mm*mm matrix used to initialize the covariance matrix of the state vector.
% Pstar [double] mm*mm matrix used to initialize the covariance matrix of the state vector.
% kalman_tol [double] scalar, tolerance parameter (rcond) of F_star.
...
...
@@ -25,7 +25,8 @@ function [dLIK,dlik,a,Pstar] = kalman_filter_d(Y, start, last, a, Pinf, Pstar, k
% OUTPUTS
% LIK [double] scalar, minus loglikelihood
% lik [double] smpl*1 vector, log density of each vector of observations.
% a [double] mm*1 vector, current estimate of the state vector.
% a [double] mm*1 vector, current estimate of the state vector tomorrow
% (E_{T}(alpha_{T+1})).
% Pstar [double] mm*mm matrix, covariance matrix of the state vector.
%
% REFERENCES
...
...
matlab/kalman/likelihood/kalman_filter_fast.m
View file @
869147c1
...
...
@@ -20,7 +20,7 @@ function [LIK, LIKK, a, P] = kalman_filter_fast(Y,start,last,a,P,kalman_tol,ricc
%!
@item
last
%!
Integer
scalar
,
last
period
(
@var
{
last
}
-
@var
{
first
}
has
to
be
inferior
to
T
).
%!
@item
a
%!
Vector
(
@var
{
mm
}
*
1
)
of
doubles
,
initial
mean
of
the
state
vector
.
%!
Vector
(
@var
{
mm
}
*
1
)
of
doubles
,
levels
of
the
predicted
initial
state
variables
(
E_
{
0
}(
alpha_1
))
.
%!
@item
P
%!
Matrix
(
@var
{
mm
}
*
@var
{
mm
})
of
doubles
,
initial
covariance
matrix
of
the
state
vector
.
%!
@item
kalman_tol
...
...
@@ -59,7 +59,7 @@ function [LIK, LIKK, a, P] = kalman_filter_fast(Y,start,last,a,P,kalman_tol,ricc
%!
@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
.
%!
Vector
(
@var
{
mm
}
*
1
)
of
doubles
,
mean
of
the
state
vector
at
the
end
of
the
(
sub
)
sample
(
E_
{
T
}(
alpha_
{
T
+
1
}))
.
%!
@item
P
%!
Matrix
(
@var
{
mm
}
*
@var
{
mm
})
of
doubles
,
covariance
of
the
state
vector
at
the
end
of
the
(
sub
)
sample
.
%!
@end
table
...
...
matlab/kalman/likelihood/kalman_filter_ss.m
View file @
869147c1
...
...
@@ -17,7 +17,7 @@ function [LIK, likk, a] = kalman_filter_ss(Y,start,last,a,T,K,iF,log_dF,Z,pp,Zfl
%!
@item
last
%!
Integer
scalar
,
last
period
(
@var
{
last
}
-
@var
{
first
}
has
to
be
inferior
to
T
).
%!
@item
a
%!
Vector
(
mm
*
1
)
of
doubles
,
initial
mean
of
the
state
vector
.
%!
Vector
(
mm
*
1
)
of
doubles
,
levels
of
the
predicted
initial
state
variables
(
E_
{
0
}(
alpha_1
))
.
%!
@item
T
%!
Matrix
(
mm
*
mm
)
of
doubles
,
transition
matrix
of
the
state
equation
.
%!
@item
K
...
...
@@ -42,7 +42,7 @@ function [LIK, likk, a] = kalman_filter_ss(Y,start,last,a,T,K,iF,log_dF,Z,pp,Zfl
%!
@item
likk
%!
Column
vector
of
doubles
,
values
of
the
density
of
each
observation
.
%!
@item
a
%!
Vector
(
mm
*
1
)
of
doubles
,
mean
of
the
state
vector
at
the
end
of
the
(
sub
)
sample
.
%!
Vector
(
mm
*
1
)
of
doubles
,
current
estimate
of
the
state
vector
tomorrow
(
E_
{
T
}(
alpha_
{
T
+
1
}))
.
%!
@end
table
%!
@sp
2
%!
@strong
{
This
function
is
called
by
:
}
...
...
matlab/kalman/likelihood/missing_observations_kalman_filter.m
View file @
869147c1
...
...
@@ -8,7 +8,7 @@ function [LIK, lik, a, P] = missing_observations_kalman_filter(data_index,numbe
% Y [double] pp*smpl matrix of data.
% start [integer] scalar, index of the first observation.
% last [integer] scalar, index of the last observation.
% a [double] pp*1 vector,
initial
level of the
state vector
.
% a [double] pp*1 vector, level
s
of the
predicted initial state variables (E_{0}(alpha_1))
.
% P [double] pp*pp matrix, covariance matrix of the initial state vector.
% kalman_tol [double] scalar, tolerance parameter (rcond).
% riccati_tol [double] scalar, tolerance parameter (riccati iteration).
...
...
@@ -25,7 +25,7 @@ function [LIK, lik, a, P] = missing_observations_kalman_filter(data_index,numbe
% OUTPUTS
% LIK [double] scalar, MINUS loglikelihood
% lik [double] vector, density of observations in each period.
% a [double] mm*1 vector, estimate
d level
of the state
s
.
% a [double] mm*1 vector,
current
estimate of the state
vector tomorrow (E_{T}(alpha_{T+1}))
.
% P [double] mm*mm matrix, covariance matrix of the states.
%
%
...
...
matlab/kalman/likelihood/missing_observations_kalman_filter_d.m
View file @
869147c1
...
...
@@ -12,7 +12,7 @@ function [dLIK,dlik,a,Pstar] = missing_observations_kalman_filter_d(data_index,n
% Y [double] pp*smpl matrix of (detrended) data, where pp is the number of observed variables.
% start [integer] scalar, first observation.
% last [integer] scalar, last observation.
% a [double] mm*1 vector, levels of the
state variables
.
% a [double] mm*1 vector, levels of the
predicted initial state variables (E_{0}(alpha_1))
.
% Pinf [double] mm*mm matrix used to initialize the covariance matrix of the state vector.
% Pstar [double] mm*mm matrix used to initialize the covariance matrix of the state vector.
% kalman_tol [double] scalar, tolerance parameter (rcond).
...
...
@@ -30,7 +30,7 @@ function [dLIK,dlik,a,Pstar] = missing_observations_kalman_filter_d(data_index,n
% OUTPUTS
% dLIK [double] scalar, MINUS loglikelihood
% dlik [double] vector, density of observations in each period.
% a [double] mm*1 vector, estimate
d level
of the state
s
.
% a [double] mm*1 vector,
current
estimate of the state
vector tomorrow (E_{T}(alpha_{T+1}))
.
% Pstar [double] mm*mm matrix, covariance matrix of the states.
%
% REFERENCES
...
...
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