smoothTimeSeries: Threshold Wavelet Coefficients to Create Smooth Time Series

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This function takes a vector of an equally-spaced time series which is of length T=2^J for a positive integer, J. The series is thresholded at all wavelet coefficient levels and a matrix is returned which contains each of the wavelet-smoothed series. Optionally, the user may plot none, one, or all of the wavelet smoothed series compared to the original input data.

This function is most useful for visualization of the data and primarily used within the WiSE bootstrap methodology.

Usage

1
2
smoothTimeSeries(X, wavFam = "DaubLeAsymm", wavFil = 8, wavBC = "periodic", 
                 plotLevels = "none", ...)

Arguments

X

a vector containing an equally-spaced data series. The vector must be of length T=2^J for some integer, J>3, contain no missing values, and be numeric. If the data is a single-row or column matrix, it must be input to this function as a vector.

wavFam

wavelet family. Allowed values are "DaubLeAsymm" and "DaubExPhase" – Daubechies Least Asymmetric and Daubechies Extremal Phase. This is the family used within the wavethresh package.

wavFil

wavelet filter number. Allowed values are integers between 4 and 10 when wavFam="DaubLeAsymm" or integers between 1 and 10 when wavFam="DaubExPhase". These correspond to the number of vanishing moments of the wavelet. This is the filter.number used within the wavethresh package.

wavBC

wavelet boundary condition. Allowed values are "periodic" and "symmetric". This is the bc used within the wavethresh package.

plotLevels

plotting option. Allowed values are "none", "all", or an integer between 0 and J-1.

...

additional graphical arguments. See plot, plot.default.

Details

To smooth the series to the J0=j level, all wavelet coefficients at levels j+1 and finer are set to 0. The reverse wavelet transformation is performed upon the thresholded coefficients to obtain each smooth data series. This method produces smooth data series for J0+1 in {0, 1, ..., J-1}. Note, when J0+1=0, this indicates that ALL filter wavelet coefficients have been set to 0.

If "all" plots are requested, all possible smooth series are plotted against the original input data within one graphical device. This is recommended for users trying to visualize the level of smoothing needed in their data. Note, J0+1 corresponds to the first fine level of coefficients which is set entirely to 0.

The wavelet options are only those allowed within the wavethresh package. Please see the documentation for wavethresh for further explanation of these quantities.

Value

a matrix containing the smooth series. The column names represent the smooth-level of the data series. The first column contains the original input data. The second column contains the wavelet smooth which sets only the finest level of coefficients to 0 (i.e. J0+1=J-1). The last column contains the smooth which sets all mother wavelet coefficients to 0 (i.e. J0+1=0). Notice, the column names should help indicate the smooth level. The matrix rows contain the ordered observations.

Author(s)

Megan Heyman

See Also

To obtain data series of the appropriate length: padVector.

Documentation regarding the wavelet transform: wavethresh-package

Examples

1
2
3
4
5
##Visualize data smoothing on the AIRS 60E data
data(CM20N20S60E)
AIRS <- as.vector(CM20N20S60E[ ,1])
padAIRS <- padVector(AIRS)$xPad
smoothAIRS <- smoothTimeSeries(padAIRS, plotLevels="all")

Example output



WiSEBoot documentation built on May 2, 2019, 12:35 p.m.