Hello all,
I found a mistake in "Guide to Statistics" book about how spec.pgram works.
Could you endorse that?
It is the equation (21.57) in page 600. This equation is the right when
deltat=1 (the sampling rate). But, if one use a regular time series with
frequency no zero the right equation is:
S(f_k)=1/(deltat n) (abs(sum_{t=1}^n x_t exp(-2 pi f_k t deltat)))^2
You can see exponential term need the "deltat"; in this way it has not units.
On the other hand, one can notice the factor 1/(deltat n) with the
following function:
compare.spec<-function(){
lynx.f<-rts(lynx,deltat=10,start=0)
spec.f10<-spec.pgram(lynx.f,taper=0,pad=0,detrend=F,demean=F)
spec.f1<-spec.pgram(lynx,taper=0,pad=0,detrend=F,demean=F)
10^((spec.f10$spec[1:10])/10)/10^((spec.f1$spec[1:10])/10)#to compare each
spectrum in natural units (NO dB)
}
compare.spec()
Do you agree?
=======================================================
Álvaro Aballe Villero
Dpto. Ciencias de los Materiales e Ingeniería
Metalúrgica y Química Inorgánica. Facultad de Ciencias.
Apartado 40 - 11510, Puerto Real (Cádiz) SPAIN.
Tel.:956830828
Fax:956834924
=======================================================
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|