
Thanks for your responses and sorry if it wasn't clear what I am trying to do.

Yes the points are 5-10-15 no more than these and let's say we are interested to capture only the increase or decrease (are more classes than these but let's start simple). Applying linear regression and comparing the slope (>0 or <0) can give an intuition however i would like to be more precise as firstly it might be need to give some time-period within the time-series that the there was bigger increase/decrease (playing with min/max) or to forecast when the max peak will happen in order to give an alert. Thus I was thinking to classify the results as exponential increase or logistic increase etc.

However as I said it seems that with few points and some "outliers" the non-linear regression can't work. So if you know any other kind of analysis/approach/algorithm appropriate for such problem I would be happy to hear.

Somewhere I read about trend-tests but again I am not sure if it's going to be something helpful.

Thanks again,
John



So trying the nls several times is not working

> Date: Sun, 19 Feb 2012 14:48:44 -0800
> Subject: Re: [R] time-series trend classification
> From: gunter.berton@gene.com
> To: roy.mendelssohn@noaa.gov
> CC: illuminati248@hotmail.com; r-help@r-project.org
> 
> If I understand you correctly, 5-10 points is not near enough to fit
> anything beyond a simple linear trend unless you know a priori what
> the form of the "trend" is. Period.
> 
> Admitting that the data are insufficient  is better than performing
> misleading analyses. *
> 
> Cheers,
> Bert
> 
> * My personal view. Others may disagree and offer more useful ways forward.
> 
> On Sun, Feb 19, 2012 at 2:25 PM, Roy Mendelssohn
> <roy.mendelssohn@noaa.gov> wrote:
> >
> > 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@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.
> >
> > ______________________________________________
> > 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.
> 
> 
> 
> -- 
> 
> Bert Gunter
> Genentech Nonclinical Biostatistics
> 
> Internal Contact Info:
> Phone: 467-7374
> Website:
> http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm
 		 	   		  
	[[alternative HTML version deleted]]

