[R] Kalman Filter

David Stoffer dsstoffer at gmail.com
Tue Mar 4 13:42:39 CET 2008


Vladimir- there are at least 3 packages that will facilitate state space
modeling: 
http://cran.r-project.org/src/contrib/Descriptions/dlm.html DLM ,
http://cran.r-project.org/src/contrib/Descriptions/dse.html DSE , and
http://cran.r-project.org/src/contrib/Descriptions/sspir.html SSPIR .

In addition, I have scripts and examples for fitting state space models and
running
the Kalman filter and smoother for Chapter 6 of our text,  
http://www.stat.pitt.edu/stoffer/tsa2/ tsa2 .  Go to "R CODE (Ch 6)" using
the
blue bar at the top.  There you will find the scripts and examples.  If you
have any
questions, feel free to contact me.


Vladimír Šamaj wrote:
> 
> Hi
> 
> 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.
> 
> 


-----
The power of accurate observation is commonly called cynicism 
by those who have not got it.  George Bernard Shaw
-- 
View this message in context: http://www.nabble.com/Kalman-Filter-tp15696135p15826374.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list