Re: [R] fitting sine wave

2011-07-28 Thread Rolf Turner
On 28/07/11 02:36, Tonja Krueger wrote: Dear R-helpers I have 7 data points that I want to fit a continuous curve to, that should look similar to a sine wave My data points would mark the local minima and maxima respectively. This is what I’ve got so far. And I would keep doing so, but sadly

Re: [R] fitting sine wave

2011-07-27 Thread Dennis Murphy
Hi: This is a linear model since you have no nonlinear term *in the parameters*. The model you postulated is as far as you can go since you have 1 df for error (unless you remove the intercept term). As the plot below shows, a linear model does not fit the data well - basically, it provides a quad

[R] fitting sine wave

2011-07-27 Thread Tonja Krueger
Dear R-helpers   I have 7 data points that I want to fit a continuous curve to, that should look similar to a sine wave My data points would mark the local minima and maxima respectively. This is what I’ve got so far. And I would keep doing so, but sadly nls() then says that it has reached the ma