Displaying 1 result from an estimated 1 matches for "buildsu".
Did you mean:
builds
2009 Feb 15
0
Kalman Filter - dlm package
...mMLE
function.
In the example provided in the user guide, F is the Identity matrix
(diag(2)) and I would like to know how to adapt the coding such that F can
vary over time and matches my case study described above.
data(NelPlo)
### multivariate local level -- seemingly unrelated time series
buildSu <- function(x) {
Vsd <- exp(x[1:2])
Vcorr <- tanh(x[3])
V <- Vsd %o% Vsd
V[1,2] <- V[2,1] <- V[1,2] * Vcorr
Wsd <- exp(x[4:5])
Wcorr <- tanh(x[6])
W <- Wsd %o% Wsd
W[1,2] <- W[2,1] <- W[1,2] * Wcorr
return(list(
m0 = rep(0,2),
C0 = 1e7 * diag(2),
FF = di...