WaveletT: Automatic wavelet transform

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

View source: R/WT.r

Description

The function automatically applies a maximal overlap discrete wavelet transform to a provided univariate time series. Wrapper function for modwt of the wavelets package. It also allows the automatic selection of the level and filter of the transform using fittestWavelet. WaveletT.rev() reverses the transformation based on the imodwt function.

Usage

1
2
3
4
5
6
7
8
9
WaveletT(
  x,
  level = NULL,
  filter = c("haar", "d4", "la8", "bl14", "c6"),
  boundary = "periodic",
  ...
)

WaveletT.rev(pred = NULL, wt_obj)

Arguments

x

A numeric vector or univariate time series to be decomposed.

level

An integer specifying the level of the decomposition. If NULL, it is automatically selected using fittestWavelet.

filter

A character string indicating which wavelet filter to use in the decomposition. If NULL, or a vector and length(filters)>1, the wavelet transform filter is automatically selected using fittestWavelet.

boundary

See modwt.

...

Additional arguments passed to fittestWavelet.

pred

A list containing component series (such as) resulting from wavelet transform (WaveletT()).

wt_obj

Object of class modwt containing the wavelet transformed series.

Value

A list containing each component series resulting from the decomposition of x (level wavelet coefficients series and level scaling coefficients series). An object of class modwt containing the wavelet transformed/decomposed time series is passed as an attribute named "wt_obj". This attribute is passed to wt_obj in WaveletT.rev().

Author(s)

Rebecca Pontes Salles

References

A. J. Conejo, M. A. Plazas, R. Espinola, A. B. Molina, Day-ahead electricity price forecasting using the wavelet transform and ARIMA models, IEEE Transactions on Power Systems 20 (2005) 1035-1042.

T. Joo, S. Kim, Time series forecasting based on wavelet filtering, Expert Systems with Applications 42 (2015) 3868-3874.

C. Stolojescu, I. Railean, S. M. P. Lenca, A. Isar, A wavelet based prediction method for time series. In Proceedings of the 2010 International Conference Stochastic Modeling Techniques and Data Analysis, Chania, Greece (pp. 8-11) (2010).

See Also

fittestWavelet, fittestEMD

Other transformation methods: Diff(), LogT(), emd(), mas(), mlm_io(), outliers_bp(), pct(), train_test_subset()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(CATS)

w <- WaveletT(CATS[,1])

#plot wavelet transform/decomposition
plot(attr(w,"wt_obj"))

x <- WaveletT.rev(pred=NULL, attr(w,"wt_obj"))

all(round(x,4)==round(CATS[,1],4))

TSPred documentation built on Jan. 21, 2021, 5:10 p.m.