This function computes the periodogram from a stationary time serie. Returns the periodogram, its graph and the Fourier frequency.
periodogram(y, plot = TRUE, include.taper = FALSE)
(type: numeric) data vector
(type: logical) logical argument which allows to plot the periodogram. Defaults to TRUE.
(type: logical) logical argument which by default is
FALSE
. If include.taper=TRUE
then y
is multiplied by
0.5(1−cos(2π(n−1)/n)) (cosine bell).
A list with with the periodogram and the lambda values.
The tapered periodogram it is given by
I(λ)=|Dn(λ)|22πH2,n(0) with D(λ)=∑n−1s=0h(sN)ys+1e−iλs, Hk,n=∑n−1s=0h(sN)ke−iλs and λ are Fourier frequencies defined as
2πk/n, with k=1,…,n.
The data taper used is the cosine bell function,
h(x)=12[1−cos(2πx)]. If the series has missing data,
these are replaced by the average of the data and n it is corrected by
$n-N$, where N is the amount of missing values of serie. The plot of
the periodogram is periodogram
values vs. λ.
For more information on theoretical foundations and estimation methods see Brockwell PJ, Davis RA, Calder MV (2002). Introduction to time series and forecasting, volume 2. Springer. Dahlhaus R, others (1997). “Fitting time series models to nonstationary processes.” The annals of Statistics, 25(1), 1--37.
fft
, Mod
,
smooth.spline
.