Displaying 2 results from an estimated 2 matches for "modfilt".
Did you mean:
modfile
2011 Jun 03
0
Package dlm generates unstable results?
...de data at the end of the mail)
BuildMod <- function(x){
return(dlm(
m0 = x[1],
C0 = x[2],
FF = 1,
GG = 1,
V = x[3],
W = x[4],
JFF = 1,
X = X
))
}
ModFit <- dlmMLE(Y,rep(1,4),BuildMod,debug=T)
dlmMod <- BuildMod(ModFit$par)
V <- dlmMod$V
W <- dlmMod$W
ModFilt <- dlmFilter(Y,dlmMod)
v <- tail(dlmSvd2var(ModFilt$U.C,ModFilt$D.C),1)
m <- tail(ModFilt$m,1)
The results are:
V = 5.945003e-05
W = 0.0003086623
v = 9.850526e-05 (the estimated variance for a_t after we observe the last pair of observations)
m = -0.02965614 (the estimated mean for a...
2011 Jun 03
0
How to reconcile Kalman filter result (by package dlm) with linear regression?
...actor)*10,
FF = matrix(1,1,nFactor),
GG = diag(nFactor),
V = tail(x,1)^2,
W = crossprod(L1),
JFF = matrix(1:4,nr=1),
X = X
))
}
ModFit <- dlmMLE(Y,rep(0.1,nTotal),BuildMod,debug=T)
dlmMod <- BuildMod(ModFit$par)
V = dlmMod$V
W = dlmMod$W
m0 = dlmMod$m0
C0 = dlmMod$C0
ModFilt <- dlmFilter(Y,dlmMod)
v <- tail(dlmSvd2var(ModFilt$U.C,ModFilt$D.C),1)
m <- tail(ModFilt$m,1)
Here is the value of Y:
0.0125678739370109
-0.00241285475528163
0.00386919876129071
-0.00352839097011217
0.00285344714211614
0.00374266510625097
0.00797807743013259
-0.00543459628953192
-0.013...