Learn R Programming

waveslim (version 1.12)

dwpt: (Inverse) Discrete Wavelet Packet Transforms

Description

All possible filtering combinations (low- and high-pass) are performed to decompose a vector or time series. The resulting coefficients are associated with a binary tree structure corresponding to a partitioning of the frequency axis.

Usage

dwpt(x, wf="la8", n.levels=4, boundary="periodic")
idwpt(y, y.basis)
modwpt(x, wf = "la8", n.levels = 4, boundary = "periodic")

Arguments

x
a vector or time series containing the data be to decomposed. This must be a dyadic length vector (power of 2).
wf
Name of the wavelet filter to use in the decomposition. By default this is set to "la8", the Daubechies orthonormal compactly supported wavelet of length $L=8$ (Daubechies, 1992), least asymmetric family.
n.levels
Specifies the depth of the decomposition. This must be a number less than or equal to $\log(\mbox{length}(x),2)$.
boundary
Character string specifying the boundary condition. If boundary=="periodic" the default, then the vector you decompose is assumed to be periodic on its defined interval, if boundary=="reflection", the vector beyond its
y
y.basis

Value

  • Basically, a list with the following components
  • w?.?Wavelet coefficient vectors. The first index is associated with the scale of the decomposition while the second is associated with the frequency partition within that level.
  • waveletName of the wavelet filter used.
  • boundaryHow the boundaries were handled.

Details

The code implements the one-dimensional DWPT using the pyramid algorithm (Mallat, 1989).

References

Mallat, S. G. (1989) A theory for multiresolution signal decomposition: the wavelet representation, IEEE Transactions on Pattern Analysis and Machine Intelligence, 11, No. 7, 674-693.

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

Wickerhauser, M. V. (1994) Adapted Wavelet Analysis from Theory to Software, A K Peters.

See Also

dwt, modwpt, wave.filter.

Examples

Run this code
data(mexm)
J <- 4
mexm.mra <- mra(log(mexm), "mb8", J, "modwt", "reflection")
mexm.nomean <- ts(
  apply(matrix(unlist(mexm.mra), ncol=J+1, byrow=FALSE)[,-(J+1)], 1, sum), 
  start=1957, freq=12)
mexm.dwpt <- dwpt(mexm.nomean[-c(1:4)], "mb8", 7, "reflection")

Run the code above in your browser using DataLab