Re: [R] Fourier Row and spectral analysis

2009-02-23 Thread Peterko

Hi, i have result from other program.
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)


.


Dieter Menne wrote:
 
 Peterko lanikpeter at gmail.com writes:
 
 Hello, i need to find in time serie, k=1,2,3...(how if possible) most
 domain
 frequencies and than smooth original serie by Fourier row  y=mean +
 a1*Cos(2*pi/freq*t)+b1*Sin(2*pi/freq*t)+a2..
 
 numbers a1,b1 ... i will have from simple regresion, i need only to find
 k
 msot domain frequensies a than i will have a1,b1,ak,bk - coeficients.
 
 
 It is very difficult to understand what you want, mainly the part about
 the
 simple regression in Fourier context. For simple filtering/smoothing,
 check
 
 http://markmail.org/message/qtyxkwlesy75 
 
 
 Dieter
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
 
 

-- 
View this message in context: 
http://www.nabble.com/Fourier-Row-and-spectral-analysis-tp22151652p22157212.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Fourier Row and spectral analysis

2009-02-23 Thread Dieter Menne
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.

Dieter

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Fourier Row and spectral analysis

2009-02-23 Thread Peterko



Dieter Menne wrote:
 
 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.
 
 Dieter
 
 It is next problem, eliminate cerrelation, but i to not know whow to get
 this most domain frequencies in R, this result is from other program.
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
 
 

-- 
View this message in context: 
http://www.nabble.com/Fourier-Row-and-spectral-analysis-tp22151652p22160005.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Fourier Row and spectral analysis

2009-02-22 Thread Dieter Menne
Peterko lanikpeter at gmail.com writes:

 Hello, i need to find in time serie, k=1,2,3...(how if possible) most domain
 frequencies and than smooth original serie by Fourier row  y=mean +
 a1*Cos(2*pi/freq*t)+b1*Sin(2*pi/freq*t)+a2..
 
 numbers a1,b1 ... i will have from simple regresion, i need only to find k
 msot domain frequensies a than i will have a1,b1,ak,bk - coeficients.


It is very difficult to understand what you want, mainly the part about the
simple regression in Fourier context. For simple filtering/smoothing, check

http://markmail.org/message/qtyxkwlesy75 


Dieter

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.