[R] how to smooth timeseries without the lagging?

Dieter Menne dieter.menne at menne-biomed.de
Sat Jul 25 11:07:50 CEST 2009




losemind wrote:
> 
> If I use a moving average, it will smooth the choppy time series, but
> it will lead to lagging...
> 

The lagging can only be removed if you look into the future, otherwise you
run into causality problems. 
So the easiest way is to center your output data on half the window width.
Not using a rectangular weighting is recommended.


Dieter


-- 
View this message in context: http://www.nabble.com/how-to-smooth-timeseries-without-the-lagging--tp24654666p24656137.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list