periodogram: Computing the periodogram

Description Usage Arguments Value References Examples

View source: R/periodogram.R

Description

This is a wrapper that computes the periodogram

Usage

1
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

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

Example output

Loading required package: leaps
Loading required package: locfit
locfit 1.5-9.1 	 2013-03-22
Loading required package: mgcv
Loading required package: nlme
This is mgcv 1.8-20. For overview type 'help("mgcv-package")'.
Loading required package: tseries

Attaching package: 'TSA'

The following objects are masked from 'package:stats':

    acf, arima

The following object is masked from 'package:utils':

    tar

TSA documentation built on July 2, 2018, 1:04 a.m.