[R] Fourier Row and spectral analysis

Dieter Menne dieter.menne at menne-biomed.de
Mon Feb 23 12:32:19 CET 2009

Peterko <lanikpeter <at> gmail.com> writes:

> Original serie have 225 observing, but program use only 224.
> the most domain frequencies are f1=1/224 f2=1/122 f3=1/74,66 f4=1/56
> f5=1/24,88
> When i know these frequencies a can do, new variable ,nubmers of variavle is
> 2*nubmer of frequencies:
> t<-1:225
> c1<-cos(2*pi*f1*t)
> s1<-sin(2*pi*f1*t)
> .
> .
> .
> s5<-sin(2*pi*f5*t)
> and now a can do lm(y~mean+c1+s1+c2+s2+...+s5)

Good you got it technically working, but having such highly correlated 
coefs like 1/224 and 1/122 in lm is asking for trouble. These are 
"almost DC" components in engineering speak for such short periods.


More information about the R-help mailing list