LSWPspec | R Documentation |
LSWPspec
returns the spectral estimate of a locally stationary time series
characterized by a wavelet packet basis.
LSWPspec(x, lev, bb, wavelet, smooth, spa, correct = TRUE, AA = NULL)
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 |
smooth |
logical. If |
spa |
window length for spectral smoothing. Increasing values increase the smoothing. |
correct |
logical. Should the returned spectral estimate be unbiased? Default is |
AA |
this argument is for internal use only and should be left alone. See also 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.
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.
Alessandro Cardinali
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.
get.wavelet.basis
, LSWPsim
, best.basis
.
wb <- get.wavelet.basis(4) wpp <- LSWPspec(x = sp500, lev = 4, bb = wb, wavelet = 'la8', smooth = TRUE, spa = 0.35)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.