Learn R Programming

timsac (version 1.3.0)

auspec: Power Spectrum

Description

Compute power spectrum estimates for two trigonometric windows of Blackman-Tukey type by Goertzel method.

Usage

auspec(y, lag=NULL, window="Akaike", log=FALSE, plot=TRUE)

Arguments

y
a univariate time series.
lag
maximum lag. Default is $2 \sqrt{n}$, where $n$ is the length of time series y.
window
character string giving the definition of smoothing window. Allowed values are "Akaike" (default) or "Hanning".
log
logical. If TRUE, the spectrum spec is plotted as log(spec).
plot
logical. If TRUE (default) the spectrum spec is plotted.

Value

  • specspectrum smoothing by window
  • stattest statistics.

Details

rlll{ Hanning Window : a1(0)=0.5, a1(1)=a1(-1)=0.25, a1(2)=a1(-2)=0 Akaike Window : a2(0)=0.625, a2(1)=a2(-1)=0.25, a2(2)=a2(-2)=-0.0625 }

References

H.Akaike and T.Nakagawa (1988) Statistical Analysis and Control of Dynamic Systems. Kluwer Academic publishers.

Examples

Run this code
y <- arima.sim(list(order=c(2,0,0), ar=c(0.64,-0.8)), n=200)
auspec(y, log=TRUE)

Run the code above in your browser using DataLab