# periodogram: Periodogram function In LSTS: Locally Stationary Time Series

## Description

This function computes the periodogram from a stationary time serie. Returns the periodogram, its graph and the Fourier frequency.

## Usage

 1 periodogram(y, plot = TRUE, include.taper = FALSE) 

## Arguments

 y (type: numeric) data vector plot (type: logical) logical argument which allows to plot the periodogram. Defaults to TRUE. include.taper (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).

## Details

The tapered periodogram it is given by

I(λ) = \frac{|D_n(λ)|^2}{2π H_{2,n}(0)}

with D(λ) = ∑_{s=0}^{n-1} h ≤ft(\frac{s}{N}\right) y_{s+1}\, e^{-i\,λ\,s}, H_{k,n} = ∑_{s=0}^{n-1}h ≤ft(\frac{s}{N}\right)^k\, e^{-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) = \frac{1}{2}[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. λ.

## Value

A list with with the periodogram and the lambda values.

## References

For more information on theoretical foundations and estimation methods see \insertRefbrockwell2002introductionLSTS \insertRefdahlhaus1997fittingLSTS

fft, Mod, smooth.spline.

## Examples

 1 2 3 4 5 # AR(1) simulated set.seed(1776) ts.sim <- arima.sim(n = 1000, model = list(order = c(1, 0, 0), ar = 0.7)) per <- periodogram(ts.sim) per\$plot 

LSTS documentation built on July 29, 2021, 5:07 p.m.