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,...)pgram by zeros.pgram we can specify the desired length of the FFT, then x is divided into pieces of
this length. FFT is done on each of these pieces and the resulting magnitude squares values are added,
np1, np2, halflen, alpha, rejalpha, logsw,
datastr, typeci, typepgram, cT = fftlen/j.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).scohdata(volumes)
dev.set(which=1)
pgram(t(volumes),length(volumes),datastr='volumes')Run the code above in your browser using DataLab