Re: [R] Fitting a sine wave using solver

2008-11-22 Thread Carl Witthoft
To follow Dieter's comment, You can in fact fit a data to a sine in Excel using LINEST. I've done it. I don't recommend it :-) . What I did was create columns containing sin(x) and cos(x) , roughly speaking, and fit using LINEST([y=values],{sines, cosines},...) Ya need the cosines or som

Re: [R] Fitting a sine wave using solver

2008-11-21 Thread Dieter Menne
Ben Zuckerberg cornell.edu> writes: > I have several sets of oscillation data and would like to estimate the > parameters of a sine function to each set (and hopefully automate > this). There is an example using lme (yes, LINEAR) fit on page 239 of Pinheiro/Bates Mixed Effects Book (ovarian

Re: [R] Fitting a sine wave using solver

2008-11-20 Thread Thomas Petzoldt
Ben Zuckerberg schrieb: Greetings, I have several sets of oscillation data and would like to estimate the parameters of a sine function to each set (and hopefully automate this). A colleague provided an excel sheet that uses solver to minimize the RSS after fitting the sine function to each

Re: [R] Fitting a sine wave using solver

2008-11-20 Thread baptiste auguie
Just a thought on this topic, I found Harminv quite powerful for this sort of task. I wonder whether it could be wrapped into a R package (it's GPL). http://ab-initio.mit.edu/wiki/index.php/Harminv On 20 Nov 2008, at 22:46, Prof Brian Ripley wrote: See e.g. http://finzi.psych.upenn.edu/R

Re: [R] Fitting a sine wave using solver

2008-11-20 Thread Prof Brian Ripley
See e.g. http://finzi.psych.upenn.edu/R/Rhelp02a/archive/131024.html RSiteSearch() produced this and similar relevant past postings. On Thu, 20 Nov 2008, Ben Zuckerberg wrote: Greetings, I have several sets of oscillation data and would like to estimate the parameters of a sine function to

[R] Fitting a sine wave using solver

2008-11-20 Thread Ben Zuckerberg
Greetings, I have several sets of oscillation data and would like to estimate the parameters of a sine function to each set (and hopefully automate this). A colleague provided an excel sheet that uses solver to minimize the RSS after fitting the sine function to each data set, but this cumbe