Description Usage Arguments Details Value Author(s) References See Also Examples

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

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

`y` |
data vector. |

`plot` |
logical argument which allows to plot the periodogram. |

`include.taper` |
logical argument which by default is |

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. *λ*.

`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`

.

Ricardo Olea <[email protected]>

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)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.