# 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 data vector. plot logical argument which allows to plot the periodogram. include.taper logical argument which by default is FALSE. If include.taper=TRUE then y is multiplied by 0.5*(1 - cos(2π(n-1)/n)) (\emph{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

periodogram is a vector with values of the periodogram of the serie, while lambda is a vector with values corresponding to Fourier frequency. The graph is periodogram ~ lambda.

## Author(s)

Ricardo Olea <[email protected]>

## References

Brockwell, Peter J., and Richard A. Davis. Introduction to time series and forecasting. 2002. ISBN-13: 978-0387953519.

Dahlhaus, R. Fitting time series models to nonstationary processes. The Annals of Statistics. 1997; Vol. 25, No. 1:1-37.

fft, Mod to 'periodogram' definition and smooth.periodogram in this package.
 1 2 3 4 5 6 7 8 9 ## Require "rdatamarket" library(rdatamarket) ## Database malleco = dmlist("22tn") mammothcreek = dmlist("22r7") periodogram(malleco$Value) periodogram(mammothcreek$Value)