Learn R Programming

iosmooth (version 0.94)

iospecden: Spectral density estimation with infinite order kernels

Description

Calculates a spectral density estimator using infinite order flat-top kernels. These estimators have been shown to automatically achieve optimal rates of covergence across a wide range of scenarios.

Usage

iospecden(x, l, kernel = c("Trap", "Rect", "SupSm"), x.points = seq(-pi, pi, len = 200))

Arguments

x
A univariate time series.
l
The smoothing parameter. If missing, adaptive bandwidth choice is used via bwadap.ts.
kernel
Three flat-top kernels are implemented, described by the shape of their Fourier transforms. "Trap" is trapezoid shaped and is the default. The rectangular kernel is not recommended and is here for comparison only. SupSm is infinitely differentiable in the Fourier domain.
x.points
Points at which the spectral density is estimated. If x.points is set to NULL, iospecden will return a function which interpolates between the estimated points.

Value

If x.points is not NULL, the function returns a list of length 2 is not NULL, the function returns a list of length 2If x.points is NULL, the function returns the estimated spectral density function rather than its values.

References

Politis, D. N., & Romano, J. P. (1995). Bias-corrected nonparametric spectral estimation. Journal of Time Series Analysis, 16(1), 67-103.

Politis, D. N. (2003). Adaptive bandwidth choice. Journal of Nonparametric Statistics, 15(4-5), 517-533.

See Also

bwadap.ts, bwplot.ts

Examples

Run this code
x <- arima.sim(list(ar=.7, ma=-.3), 100)
bwplot(x)
plot(iospecden(x), type="l")

Run the code above in your browser using DataLab