TSA (version 1.3)

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

Run this code
# NOT RUN {
data(star)
plot(star,xlab='Day',ylab='Brightness')
periodogram(star,ylab='Variable Star Periodogram');  abline(h=0)
# }

Run the code above in your browser using DataLab