[R] time-series trend classification

Roy Mendelssohn roy.mendelssohn at noaa.gov
Sun Feb 19 23:25:15 CET 2012


On Feb 19, 2012, at 9:46 AM, John Kohr wrote:

> 
> Hello everyone,
> 
> I was looking for a way to classify time-series based on the curve-fit. I try to campute several trends so i was thinking to link each trend with a function. increase with exponential for example, increase and decrease with a gaussian etc. The possiblities are endless though and it seems that is not always working well, especially if you work on small time-series (of 5-10 points only - one point in the end of the time-series can make the nls function to not be able to find the best fit among all these functions). Is there any package doing something similar? or another technique that could capture such trends? I can't find any code or publication on that, so I guess is something that is tested and is not working?
> 
> Any help is appreciated.
> 
> Best,
> John 

One option you have is to use StructTS	which fits what is essentially a non-parametric trend  (it is actually a local smooth of the data).  That should give you an idea of the time trend if you then prefer a functional form for the trend.  There are other packages that do similar analysis, StructTS is built into the basic stat package.

HTH,

-Roy M	 	   		   		 	   		  


**********************
"The contents of this message do not reflect any position of the U.S. Government or NOAA."
**********************
Roy Mendelssohn
Supervisory Operations Research Analyst
NOAA/NMFS
Environmental Research Division
Southwest Fisheries Science Center
1352 Lighthouse Avenue
Pacific Grove, CA 93950-2097

e-mail: Roy.Mendelssohn at noaa.gov (Note new e-mail address)
voice: (831)-648-9029
fax: (831)-648-8440
www: http://www.pfeg.noaa.gov/

"Old age and treachery will overcome youth and skill."
"From those who have been given much, much will be expected" 
"the arc of the moral universe is long, but it bends toward justice" -MLK Jr.



More information about the R-help mailing list