Learn R Programming

wmtsa (version 2.0-3)

wavMODWPT: The maximal overlap discrete wavelet packet transform (MODWPT)

Description

Given \(j, n, t\) are the decomposition level, oscillation index, and time index, respectively, the MODWPT is given by $$ \widetilde{W}_{j,n,t} \equiv \sum_{l=0}^{L-1}\widetilde{u}_{n,l} \widetilde{W}_{j-1,\lfloor n/2 \rfloor, t - 2^{j-1}\;l \mbox{ mod }N} $$

The variable \(L\) is the length of the filters defined by $$ \widetilde{u}_{n,l} \equiv \left\{ \begin{array}{ll} \widetilde{g_l}/\surd{2}, & \mbox{ if }n \bmod 4=0 \mbox{ or }3; \\ \widetilde{h_l}/\surd{2}, & \mbox{ if }n \bmod 4=1 \mbox{ or }2, \end{array}\right. $$

where \(g\) and \(h\) are the scaling filter and wavelet filter, respectively. By definition, \(\widetilde{W}_{0,0,t} \equiv X_t\) where \(\{X_t\}\) is the original time series.

Usage

wavMODWPT(x, wavelet="s8", n.levels=ilogb(length(x), base=2),
    position=list(from=1,by=1,units=character()), units=character(),
    title.data=character(), documentation=character())

Arguments

x

a vector containing a uniformly-sampled real-valued time series.

documentation

a character string used to describe the input data. Default: character().

n.levels

the number of decomposition levels. Default: as.integer(floor(logb(length(x),base=2))).

position

a list containing the arguments from, by and to which describe the position(s) of the input data. All position arguments need not be specified as missing members will be filled in by their default values. Default: list(from=1, by=1, units=character()).

title.data

a character string representing the name of the input data. Default: character().

units

a string denoting the units of the time series. Default: character() (no units).

wavelet

a character string denoting the filter type. See wavDaubechies for details. Default: "s8".

Value

an object of class wavTransform.

References

D. B. Percival and A. T. Walden, Wavelet Methods for Time Series Analysis, Cambridge University Press, 2000.

See Also

reconstruct, wavMRD, wavMODWT, wavDWT, wavDWPT, wavDaubechies, wavShift, wavZeroPhase.

Examples

Run this code
# NOT RUN {
## calculate the MODWPT of sunspots series out to 
## 3 levels using Daubechies least asymmetric 
## 8-tap filter set 
z <- wavMODWPT(sunspots, wavelet="s8", n.levels=3)

## plot the transform 
plot(z)

## summarize the transform 
summary(z)
# }

Run the code above in your browser using DataLab