Guest User

Untitled

a guest
Dec 19th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. # construct state space representation
  2. mod <- makeARIMA(theta=-.43, phi=0, Delta = 1)
  3. # run the kalman filter given the two observations
  4. mod <- KalmanRun(c(33.4, 33.9), mod, update=TRUE)
  5. # put final state estimate into new model object
  6. mod <- attr(mod,"mod")
  7. # compute forecasts via the Kalman filter
  8. > KalmanForecast(4,mod)
  9. $pred
  10. [1] 33.71854 33.71854 33.71854 33.71854
  11.  
  12. $var
  13. [1] 1.028853 1.353753 1.678653 2.003553
Add Comment
Please, Sign In to add comment