cc
project.org
Subject
[R] Fit a sine to data
Juan Manuel Barreneche wrote:
> i guess nls or gnls should work
>
Yes. Notice though that this is really a linear problem because of the
trigonometric identity
sin(x+b) = cos(b) * sin(x) + sin(b) * cos(x)
which means that you can reparametrize c*sin(x+b) (you forgot the
multiplier, did you
i guess nls or gnls should work
JM
El Viernes, 23 de Mayo de 2008 10:47, Zroutik Zroutik escribió:
> Dear R-users,
>
> I'd like to fit a sine function to my data. The result should have a format
> (and thus the formula, too)
>
> y ~ a + sin(x+b)
>
> where y and x are vectors, and a and b are
Dear R-users,
I'd like to fit a sine function to my data. The result should have a format
(and thus the formula, too)
y ~ a + sin(x+b)
where y and x are vectors, and a and b are (yet) unknown values.
The data sets (vectors x and y) are OK, and I can do a simple lm fitting
lm(y~x), or lm(y~I(sin
4 matches
Mail list logo