[R] Kalman Filter

From: Vladimír Šamaj <samajv_at_gmail.com>
Date: Tue, 26 Feb 2008 18:25:04 +0100


My name is Vladimir Samaj. I am a student of Univerzity of Zilina. I am trying to implement Kalman Filter into my school work. I have some problems with understanding of R version of Kalman Filter in package stats( functions KalmanLike, KalmanRun, KalmanSmooth,KalmanForecast).

  1. Can you tell me how are you seting the initial values of state vector in Kalman Filter? Are you using some method?
  2. I have fond function StructTS in stats package. I dont understand, how exactly, are you computing(what method are you using) fitted values which are the output of this function( $fitted ) . In description od this function is that it fit a structural model for a time series by maximum likehood. Does it means, that the fitted values are fit by maximum likehood? If so how does look the likehood function?

3)Finaly, I dont understand smooting problem. What I know is that, if I have t observations of some time serie, I can use function KalmanRun to get estimates of state vector. And if I gain aditional observations of time serie( T > t ), I shoud use KalmanSmooth function to smooth estimates of state vector. I dont understand, that how shoud I "tell" to KalmanSmooth funtion that I allready did filtering and it shoud use the values from filtering to smoothing.

I will be glad if you help me. I hope that my folmulations were correct.

Thank you very much.

        [[alternative HTML version deleted]]

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 26 Feb 2008 - 17:57:25 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 04 Mar 2008 - 13:30:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive