Learn R Programming

wmtsa (version 2.0-3)

wavDWPT: The discrete wavelet packet transform (DWPT)

Description

Given \(j, n, t\) are the decomposition level, oscillation index, and time index, respectively, the DWPT is given by $$ W_{j,n,t}=\sum_{l=0}^{L-1}u_{n,l} W_{j-1,\lfloor n/2 \rfloor, 2t + 1 - l\;\bmod N_{j-1}}\mbox{,\qquad}t=0,\ldots,N_j-1, \] where $N_j\equiv N / 2^j$ and $\lfloor\cdot\rfloor$ denotes the integer part. % The variable $L$ is the length of the filters defined by \[ u_{n,l} \equiv \left\{ \begin{array}{ll} g_l, & \mbox{ if }n \bmod 4=0 \mbox{ or }3; \\ h_l, & \mbox{ if }n \bmod 4=1 \mbox{ or }2, \end{array}\right. $$

The variables \(g\) and \(h\) represent the scaling filter and wavelet filter, respectively. Each filter is of length \(L\). By definition, \(W_{0,0,t} \equiv X_t\) where \(\{X_t\}\) is the original time series.

Usage

wavDWPT(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

wavBestBasis, wavPacketBasis, reconstruct, wavDWT, wavMODWT, wavMODWPT, wavDaubechies, wavMaxLevel.

Examples

Run this code
# NOT RUN {
## calculate the DWPT of sunspots series out to 3 
## levels using Daubechies least asymmetric 
## 8-tap filter set 
z <- wavDWPT(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