0
$\begingroup$

I'm having some problems interpreting the F-statistics output from multitaper analysis. To illustrate, the following code-snip in R performs multitaper analysis on the same sine-frequency but with different lengths, and I would assume that longer signal would result in higher F values at the corresponding frequency, but that is apparently not the case:

library (multitaper)
mt <- function (length, freq=1/20) {

  s <- sin ((1:length) * 2 * pi * freq) 

  nFFT <- 2 * 2^ceiling(log2(length))  # default setting
  nw <- 4  # default setting
  k <- 7  # default setting

  Ftest=spec.mtm(timeSeries=as.ts(s), nw=4, k=7, nFFT=nFFT, centre = 'Slepian', Ftest = TRUE, plot=F)

  fs <- max (Ftest$mtm$Ftest)
  fq <- Ftest$freq[which (Ftest$mtm$Ftest == fs)]

  paste ("length:", length, "nFFT", nFFT, "measured frequency:", round(fq,2), "Fstat",  round (fs,2))

}

sapply ((1:5)*100, function (x) mt (x))

outputs:

[1] "length: 100 nFFT 256 measured frequency: 0.05 Fstat 322.42" 
[2] "length: 200 nFFT 512 measured frequency: 0.05 Fstat 83.2"   
[3] "length: 300 nFFT 1024 measured frequency: 0.05 Fstat 674.32"
[4] "length: 400 nFFT 1024 measured frequency: 0.05 Fstat 369.38"
[5] "length: 500 nFFT 1024 measured frequency: 0.05 Fstat 232.36"

Definitely not a positive correlation between length and Fstat, why is that? Also, the exact same is seen using the python implementation of multitaper, i.e. probably not an R related issue.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.