spec.pgram() - circularity of kernel

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

spec.pgram() - circularity of kernel

Nuno Prista

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.


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

Thanks in advance,

Nuno Prista

[hidden email] mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.