search for: c4sin

Displaying 1 result from an estimated 1 matches for "c4sin".

Did you mean: c1sin
2009 Jul 15
0
time series fiting and residual computing
...to compute residuals. I tried with two option but not sure which one is correct, kindly any one can help correcting me: # #I would like to fit a model with Fourth harmonic function as: #m(t)=a+bt+ct^2+c1sin(omega1*t)+d1cos(omega1.t)+c2sin(omega2.t)+d2cos(omega2.t)+c3sin(omega3.t)+d3cos(omega3.t)+c4sin(omega4.t)+d4cos(omega4.t) # In my data 'file' I have two variable 'co2obs' and 'time' # SO above function in R will look like EITHER as: testfit<-lm(co2obs~1+time+(time^2)+sin(2*pi*time)+cos(2*pi*time)+sin(4*pi*time)+cos(4*pi*time)+sin(6*pi*time)+cos(6*pi*time)+sin(8*pi*...