LSWPspec: Locally Stationary Wavelet Packet Spectral Estimation

View source: R/LSWPspec.R

LSWPspecR Documentation

Locally Stationary Wavelet Packet Spectral Estimation

Description

LSWPspec returns the spectral estimate of a locally stationary time series characterized by a wavelet packet basis.

Usage

LSWPspec(x, lev, bb, wavelet, smooth, spa, correct = TRUE, AA = NULL)

Arguments

x

a real valued numeric vector containing a time series of dyadic length.

lev

the maximum level for which the spectra should be estimated.

bb

a wavelet packet basis for which the spectra is estimated.

wavelet

wavelet used to estimate the wavelet packet spectra. Possible values are "haar", "d4" and "la8". See also Details.

smooth

logical. If FALSE the returned spectral estimate is not smoothed. Default value is FALSE. See also Details.

spa

window length for spectral smoothing. Increasing values increase the smoothing.

correct

logical. Should the returned spectral estimate be unbiased? Default is TRUE.

AA

this argument is for internal use only and should be left alone. See also Details.

Details

The current implementation allow the use of these three well known Daubechies discrete wavelets for spectral estimation. Default choice is the "la8" wavelet which has decent control over frequency leakage characterizing compactly supported filters. In this initial implementation smoothing is provided by local polynomials through the lowess function and the smoothing parameter spa is passed to lowess. Future package versions will allow for different smoothing methods. The argument AA is tipically used by other functions to provide the inner product matrix when running simulations. For a direct usage on a single time series the matrix is calculated internally usig the default settings.

Value

A matrix containing the time-frequency spectral estimate where each column corresponds to a different time point and ech row corresponds to a different packet from the given basis.

Author(s)

Alessandro Cardinali

References

A. Cardinali and G.P. Nason (2017). Locally Stationary Wavelet Packet Processes: Basis Selection and Model Fitting. Journal of Time Series Analysis, 38:2, 151-174.

See Also

get.wavelet.basis, LSWPsim, best.basis.

Examples


 wb <- get.wavelet.basis(4)
wpp <- LSWPspec(x = sp500, lev = 4, bb = wb, wavelet = 'la8', smooth = TRUE, spa = 0.35)


LSWPlib documentation built on March 18, 2022, 6:55 p.m.

Related to LSWPspec in LSWPlib...