Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

periodogram

Computing the periodogram


Description

This is a wrapper that computes the periodogram

Usage

periodogram(y,log='no',plot=TRUE,ylab="Periodogram", xlab="Frequency",lwd=2,...)

Arguments

y

A univariate time series

log

if set to "yes", the periodogram is plotted on the log-scale; default="no"

plot

The periodogram is plotted if it is set to be TRUE which is the default

ylab

label on the y-axis

xlab

label on the x-axis

lwd

thickness of the periodogram lines

...

other arguments to be passed to the plot function

Value

A list that contains the following elements:

freq

Vector of frequencies at which the spectral density is estimated. (Possibly approximate Fourier frequencies.

spec

Vector of estimates of the periodogram at frequencies corresponding to freq.

References

Bloomfield, P. (1976) Fourier Analysis of Time Series: An Introduction. Wiley.

Brockwell, P. J. and Davis, R. A. (1991) Time Series: Theory and Methods. Second edition. Springer.

Examples

data(star)
plot(star,xlab='Day',ylab='Brightness')
periodogram(star,ylab='Variable Star Periodogram');  abline(h=0)

TSA

Time Series Analysis

v1.3
GPL (>= 2)
Authors
Kung-Sik Chan, Brian Ripley
Initial release
2020-9-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.