Scott Stephens
2010-Aug-23 17:33 UTC
[R] Kalman Filtering with Singular State Noise Covariance Matrix
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
Seemingly Similar Threads
- Fwd: How to compute eigenvectors and eigenvalues?
- Help with kalman-filterd betas using the dlm package
- sem R: singular and Could not compute QR decomposition of Hessian
- How to reconcile Kalman filter result (by package dlm) with linear regression?
- Forcing scalar multiplication.