search for: noofsteps

Displaying 1 result from an estimated 1 matches for "noofsteps".

Did you mean: footsteps
2011 Nov 18
0
Kalman Filter with dlm
...future, I will NOT have data for all three variables. So, I am predicting X1 and X2 using two Kalman filters. The code is below x1.model <- dlmModSeas(52) + dlmModPoly(1, dV=5, dW=10) x2.model <- dlmModSeas(52) + dlmModPoly(1, dV=10, dW=10) x1.filter <- dlmFilter(c(train$x1, rep(NA, noofsteps)), x1.model) x2.filter <- dlmFilter(c(train$x2, rep(NA, noofsteps)), x2.model) Now, I am forecasting Y using the predicted X1 and X2 as below pred <- cbind(c(train$x1, x1.filter$f[260:312]),c(train$x2, x2.filter$f[260:312])) Y.model <- dlmModSeas(52) + dlmModReg(pred, dV=0.5, dW=...