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
Hi,
I am far from experienced in both R and time series hence the question.
The code for spec.pgram() seems to involve 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
Seemingly Similar Threads
- Different freq returned by spec.ar() and spec.pgram()
- spec.pgram returns different spectra when fast=TRUE and the number of samples is odd
- Proposed speedup of spec.pgram from spectrum.R
- discrepancy between periodogram implementations ? per and spec.pgram
- using spec.pgram