Re: [R] Cycle Regression Analysis in R?

From: Charles C. Berry <cberry_at_tajo.ucsd.edu>
Date: Thu, 10 Jan 2008 16:44:15 -0800

On Thu, 10 Jan 2008, Carson Farmer wrote:

> Hello R community,
>
> Does anyone know of a package that will perform cycle regression
> analysis? I have searched the R-help archives etc. but have come up with
> nothing so far.
> If I am unable to find an existing R package to do so, is there anyone
> familiar with fitting sine functions to data. My problem is this:
> I have a long time-series of daily SWE estimates (SWE = snow water
> equivalence, or the amount of water stored in a snowpack) which follows
> a sinusoidal pattern, and I need to estimate the parameters of the sine
> function that best fits this data. While there may be many contributing
> sine functions and/or linear trends, I am only interested in a single
> sine function that most closely fits the data (trends can be removed
> separately if need be). Perhaps some sort of non-linear least squares
> method would be best?

Or maybe stl? ( Seasonal Decomposition of Time Series by Loess )

Try

         example( stl )

and see the reference in

         ?stl

HTH, Chuck

p.s. Surely, SWE is NOT sinusoidal. At least not in my local mountains.

>
> Any help, or suggestions to get me on the right track are greatly
> appreciated.
>
> Carson
>
> ______________________________________________
> R-help_at_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.
>

Charles C. Berry                            (858) 534-2098
                                             Dept of Family/Preventive Medicine
E mailto:cberry_at_tajo.ucsd.edu	            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901

R-help_at_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. Received on Fri 11 Jan 2008 - 00:48:12 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 11 Jan 2008 - 01:30:06 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive