[R] detrending a time series

Christoph Scherber Christoph.Scherber at agr.uni-goettingen.de
Wed Oct 10 16:16:39 CEST 2007


Dear R users,

I am trying to ´detect´ the trend in an artificial time series created 
by the simple function

x=seq(pi,10*pi,0.1)
my.ts=0.1*x+sin(x)

my.ts=ts(my.ts,start=1800)
plot(my.ts)

I have tried stl(my.ts), but because I don´t have ´replications´ at 
every time point, this somehow doesn´t work.

How could I best detect the trend in the ts?

I would very much appreciate any help!

Thanks a lot in advance
Christoph


(using R 2.6.0 on Windows XP)



More information about the R-help mailing list