Estimate spectral density from smoothed periodogram

Usage

spec.pgram(x, spans=1, taper=0.1, demean=FALSE, detrend=TRUE, pad=FALSE, plot=FALSE)

Arguments

x A vector or matrix time series
spans vector of widths of modified Daniell windows to be successively applied when smoothing the periodogram
taper A split cosine taper is applied to the first and last 100 * spans % of the data before calculating the periodogram
demean Sweep out mean of time series
detrend Subtract linear trend from time series to improve stationarity. This option overrides demean
pad If set to TRUE, the end of the series will be padded out with zeros so that the chain is a convenient length for the Fast Fourier Transform
plot This doesn't do anything. It's just there for S-PLUS compatibility

Value

A list with the following elements
spec Spectral density estimated from the smoothed periodogram and expressed in decibels
freq Corresponding frequencies at which the spectral density is calculated

Note

This is an attempt to clone the S-PLUS spec.pgram function. It has comparatively limited functionality.

Author(s)

Martyn Plummer


[Package Contents]