4 Kalman Filtering in R
Although the matrices performing the block triangularizations described in equations (10)
and (13) can be obtained quite efficiently (Lawson and Hanson 1974; Gentle 2007), clearly
the computational effort is greater than that required by the time and measurement updates
in equations (6) and (8); square root filtering does have a cost.
In the equations above G and G
∗
can be chosen so that M and M
∗
are Cholesky factors
of the corresponding covariance matrices. This needs not be so, and other factorizations
are possible. In particular, the factors in the singular value decomposition of P
t−1
can be
propagated: see for instance Zhang and Li (1996) and Appendix B of Petris et al. (2009). Also,
we may note that time and measurement updates can be merged in a single triangularization
(see Anderson and Moore 1979, p. 148, and Vanbegin and Verhaegen 1989).
2.3. Sequential processing
In the particular case where H
t
is diagonal, the components of y
t
>
= (y
1t
, . . . , y
pt
) are
uncorrelated. We may pretend that we observe one y
it
at a time and perform p univariate
measurement updates similar to (7)–(8), followed by a time update (5)–(6) – see Durbin and
Koopman (2001, Section 6.4) or Anderson and Moore (1979) for details.
The advantage of sequential processing is that F
t
becomes 1 ×1 and the inversion of a p ×p
matrix in equation (7)–(8) is avoided. Clearly, the situation where we stand to gain most
from this strategy is when the dimension of the observation vector y
t
is large.
Sequential processing can be combined with square root covariance and information filters,
although in the latter case the computational advantages seem unclear (Anderson and Moore
1979, p. 142; see also Bierman 1977).
Aside from the case where H
t
is diagonal, sequential processing may also be used when H
t
is block diagonal – in which case we can perform a sequence of reduced dimension updates
– or when it can be reduced to diagonal form by a linear transformation. In the last case,
assuming full rank, let H
−1/2
t
be a square root of H
−1
t
. Multiplying (2) through by H
−1/2
t
we get
y
∗
t
= d
∗
t
+ Z
∗
t
α
t
+
∗
t
(14)
with E[
∗
t
∗
t
>
] = I. If matrix H
t
is time-invariant, the same linear transformation will
decorrelate the measurements at all times.
2.4. Smoothing and the simulation smoother
The algorithms presented produce predicted a
t|t−1
or filtered a
t
values of the state vector
α
t
. Sometimes it is of interest to estimate a
t|N
for 0 < t ≤ N, i.e., E[α
t
|y
0
, . . . , y
N
], the
value of the state vector given all past and future observations. It turns out that this can
be done running once the Kalman filter and then a recursion backwards in time (Durbin and
Koopman 2001, Section 4.3, Harvey 1989, Section 3.6).
In some cases, and notably for the Bayesian analysis of the state space model, it is of interest
to generate random samples of state and disturbance vectors, conditional on the observations
y
0
, . . . , y
N
. Fr
¨
uhwirth-Schnatter (1994) and Carter and Kohn (1994) provided algorithms to
that purpose, improved by de Jong (1995). Durbin and Koopman (2001, Section 4.7) draws
on work of the last author; the algorithm they present is fairly involved. Recently, Durbin
and Koopman (2002) have provided a much simpler algorithm for simulation smoothing of
the Gaussian state space model; see also Strickland et al. (2009).
评论2
最新资源