pgram | R Documentation |
The periodogram is a classical tool
based on the sample Fourier transform
for finding periodic components in a time series.
The procedure pgram
computes and plots an average
of np
periodograms where np=floor(length(x)/fftlen)
where the
input parameter fftlen
is the length of the FFT; to get just
1 FFT of length fftlen
, use x(1:fftlen)
in place of x
. To get a
significance of high periodogram peaks, the procedure tests,
at each frequency, the value of the averaged periodogram against
the average of 2*halflen
neighboring cells (halflen
on each side),
and averaged over the np
periodograms; the neighboring cell average
is called the background. Significance of the ratio of center
frequency average to the background average is computed from the
F distribution.
pgram(x, fftlen,...)
x |
input time series, missing values denoted by NaNs will be
replaced in |
fftlen |
length of FFT which will be used. In |
... |
other arguments that are connected with periodogram plot: |
When we assume that period T_t
of PC-T structure is unknown,
function pgram
enables us to find
candidate for the period length assuming the period of
the second order structure is the same as the period of
the first order structure (IE, in the series itself).
For any FFT index j
(say where a strong peak occurs)
j
corresponds to the number of cycles in the FFT window,
so the period can be easily computed as T_t = fftlen/j
.
Harry Hurd
Box, G. E. P., Jenkins, G. M., Reinsel, G. (1994), Time Series Analysis, 3rd Ed., Prentice-Hall,
Englewood Cliffs, NJ.
Hurd, H. L., Miamee, A. G., (2007), Periodically Correlated Random Sequences:
Spectral Theory and Practice, Wiley InterScience.
scoh
data(volumes)
dev.set(which=1)
pgram(t(volumes),length(volumes),datastr='volumes')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.