Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # construct state space representation
- mod <- makeARIMA(theta=-.43, phi=0, Delta = 1)
- # run the kalman filter given the two observations
- mod <- KalmanRun(c(33.4, 33.9), mod, update=TRUE)
- # put final state estimate into new model object
- mod <- attr(mod,"mod")
- # compute forecasts via the Kalman filter
- > KalmanForecast(4,mod)
- $pred
- [1] 33.71854 33.71854 33.71854 33.71854
- $var
- [1] 1.028853 1.353753 1.678653 2.003553
Add Comment
Please, Sign In to add comment