search for: d1cos

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

Did you mean: cos
2009 Jul 15
0
time series fiting and residual computing
...timeseries which I want to fit with fourth harmonic function and then would like 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(...