I have a bunch of clean timeseries data obtained from a sensor and I'd like to apply a Kalman Filter to it to smoothe it out. Through a few days of Googling, reading papers, implementing such a filter in various languages, I finally realised that it may be built into R. So I did a "??kalman" at the R prompt and found that it is indeed there. However, the help page is a tad bare, which is probably why it doesn't show up in my days of searching. Someone wrote the code, someone clearly made use of it at some point. If that someone is on this list, would said person please post sample code? Many thanks! -- Sent from my mobile device Envoyait de mon portable
Look at the package dlm, fkf, or sspir for various kalman filter implementations. I use dlm regularly and it's great. On Wed, Mar 7, 2012 at 8:07 PM, Hasan Diwan <hasan.diwan@gmail.com> wrote:> I have a bunch of clean timeseries data obtained from a sensor and I'd > like to apply a Kalman Filter to it to smoothe it out. Through a few > days of Googling, reading papers, implementing such a filter in > various languages, I finally realised that it may be built into R. So > I did a "??kalman" at the R prompt and found that it is indeed there. > However, the help page is a tad bare, which is probably why it doesn't > show up in my days of searching. Someone wrote the code, someone > clearly made use of it at some point. If that someone is on this list, > would said person please post sample code? Many thanks! > -- > Sent from my mobile device > Envoyait de mon portable > > ______________________________________________ > R-help@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. >[[alternative HTML version deleted]]
On 08/03/2012 02:07, Hasan Diwan wrote:> I have a bunch of clean timeseries data obtained from a sensor and I'd > like to apply a Kalman Filter to it to smoothe it out. Through a few > days of Googling, reading papers, implementing such a filter in > various languages, I finally realised that it may be built into R. So > I did a "??kalman" at the R prompt and found that it is indeed there. > However, the help page is a tad bare, which is probably why it doesn't > show up in my days of searching. Someone wrote the code, someone > clearly made use of it at some point. If that someone is on this list, > would said person please post sample code? Many thanks!That person is, but he will not post it. The 'sample code' is tsSmooth(), which *is* in the 'See Also' for the help page. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595