Hello All,

I cant seem to do a trig regression in R.

The equation is as follows : y = a+b*(sin((2*pi*x/360) - c))^2

a, b, c are coefs that I want.
y, x are input vectors.

The equation I put into R: lm(y ~ sin(2*pi*x/360)^2)
This equation is missing the c and I dont get the right answer.

Also, I dont know how to plot the lm over the x values instead of the
indices.

Any help is sincerely appreciated.
Thank you all very much.

-- 
Aaditya Nanduri
aaditya.nanduri@gmail.com

	[[alternative HTML version deleted]]

