[R] spec.pgram() - circularity of kernel

Nuno Prista nmprista at fc.ul.pt
Sun Nov 25 19:54:29 CET 2007


Hi,

I am far from experienced in both R and time series hence the question. 

The code for spec.pgram() seems to involve a circularity of the kernel (see
below) yielding new power estimates to all frequencies computed by FFT. 

"
   if (!is.null(kernel)) {
        for (i in 1:ncol(x)) for (j in 1:ncol(x)) pgram[, i, 
            j] <- kernapply(pgram[, i, j], kernel, circular = TRUE)
"

Can anyone comment on whether the extreme frequencies (low and high) of the
spectrum are still reliable with this circularity option? At the extremes,
values seem to result from kernel application to collections of high and low
frequencies. Related to this, shouldn't the frequency range shorten
according to the size of kernel used? My doubt came from reading
Diggle(1990) p105.

e.g.

data(lh)
x<-spec.pgram(ldeaths, detrend=T, taper=0)$freq
y<-spec.pgram(ldeaths, kernel("modified.daniell", c(6,6)), detrend=T,
taper=0)$freq
x==y


Thanks in advance,

Nuno Prista



More information about the R-help mailing list