Skip to content
Prev 369930 / 398503 Next

fitting cosine curve

On Wed, 21 Jun 2017, J C Nash wrote:

            
The model is linear up to omega after transformation as Don and I noted.

Taking a guess that 2*pi/240 = 0.0262 is about right for omega:
$maximum
[1] 0.02794878

$objective
[1] 0.8127072
Isn't this stable enough?

And as you note

plot(lm(y~cos(t*0.0279)+sin(t*0.0279)))

reveals lack-of-fit.

Of course there are some other issues not addressed here such as 
possible autoregression.

HTH,

Chuck
Charles C. Berry                 Dept of Family Medicine & Public Health
cberry at ucsd edu               UC San Diego / La Jolla, CA 92093-0901
http://biostat.ucsd.edu/ccberry.htm