Displaying 1 result from an estimated 1 matches for "omega3".
Did you mean:
omega
2009 Jul 15
0
time series fiting and residual computing
...nction 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(2*pi*time)+sin(4*pi*time)+cos(4*pi*time)+sin(6*pi*time)...