Description Usage Arguments Details Value Author(s) Examples
The periodogram is computed at either Fourier or non-Fourier frequencies
1 | pgramFourier(z, numFreq = "default", demean = TRUE)
|
z |
time series vector of length n, say. |
numFreq |
use "default" for usual Fourier frequencies, 1/n, ..., floor(n/2)/n. Set fr = N, to evaluate the periodogram at the Fourier frequencies corresponding to a time series of length N. The frequencies are in cycles per unit time. |
demean |
whether the sample mean is subtracted from the series. |
Uses FFT. So if the length of z is a highly composite number, the computation is very efficient. Otherwise the usual DFT is used.
Periodogram
A.I. McLeod and Yuanhao Lai
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | z<-sunspot.year
n<-length(z)
I<-pgramFourier(z)
f<-I[,1]
I <- I[,2]
plot(f, I, xlab="f", ylab="f", type="l")
title(main="Periodogram for Annual Sunpots, 1700-1988")
#
z<-c(0.42, 0.89, 1.44, 1.98, 2.21, 2.04, 0.82, 0.62, 0.56, 0.8, 1.33)
pgramFourier(z)
ans <- pgramFourier(z, numFreq=101)
plot(ans[,1], ans[,2], type="l", xlab="frequency", ylab=
"periodogram")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.