[R] Kalman Filtering with Singular State Noise Covariance Matrix

Scott Stephens stephens.js at gmail.com
Mon Aug 23 19:33:20 CEST 2010


Since notation for state-space models vary, I'll use the following convention:

x(t) indicates the state vector, y(t) indicates the vector of observed
quantities.
State Transition Equation: x(t+1) = Fx(t) + v(t)
Observation Equation: y(t) = Gx(t) + w(t)
Cov[v(t)] = V
Cov[w(t)] = W

I've found myself in a situation where I will have V = s%*%t(s)*k^2,
with s a vector the same length as the state vector, and k a constant.
 Theoretically then, V should be exactly singular, with exactly 1
nonzero eigenvalue.  In practice, of course, I often end up with V
having many very small positive eigenvalues, and a few very small
negative eigenvalues - I'm not sure whether this is a consequence of
the numerical error coming from the outer product or from the
eigenvalue decomposition.  I've been trying to use the dlm package,
but it computes the eigenvalue decomposition of V and complains when
it's not numerically non-negative definite.  My end goal with using
dlm is to compute the likelihood function in order to do an MLE.

Is there a recommended way of handling this problem?  Would another
package be easier to use in this case?


-- Scott



More information about the R-help mailing list