Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dwt.forward

Discrete Wavelet Transform and Maximal Overlap Discrete Wavelet Tranform Forward and Backward Pyramid Algorithm


Description

Implementation of DWT and MODWT forward and backward pyramid algorithms.

Usage

dwt.forward(V, filter)
dwt.backward(W, V, filter)
modwt.forward(V, filter, j)
modwt.backward(W, V, filter, j)

Arguments

W

A vector of wavelet coefficients.

V

A vector of scaling coefficients.

filter

A wt.filter object.

j

The level of wavelet and scaling coefficients to compute (for forward algorithm) or the level of wavelet and scaling coefficient inputs (for inverse algorithm).

Details

An implementation of the DWT and MODWT forward and backward pyramid algorithms using pseudocode written by Percival and Walden (2000), pp. 100-101, 177-178. These functions are intended primarily as helper functions for the dwt, modwt, idwt and imodwt functions.

Value

dwt.forward and modwt.forward return a list of two elements containing vectors of wavelet and scaling coefficients for the subsequent level of analysis. dwt.backward and modwt.backward return a vector of scaling coefficients for the previous level of analysis.

Author(s)

Eric Aldrich. ealdrich@gmail.com.

References

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

See Also

Examples

# obtain the two series listed in Percival and Walden (2000), page 42
X1 <- c(.2,-.4,-.6,-.5,-.8,-.4,-.9,0,-.2,.1,-.1,.1,.7,.9,0,.3)
X2 <- c(.2,-.4,-.6,-.5,-.8,-.4,-.9,0,-.2,.1,-.1,.1,-.7,.9,0,.3)

# compute the LA8 wavelet filter for both DWT and MODWT
la8.dwt <- wt.filter()
la8.modwt <- wt.filter(modwt=TRUE)

# compute the DWT and MODWT level one wavelet and scaling coefficients
wt.dwt <- dwt.forward(X1, la8.dwt)
wt.modwt <- modwt.forward(X2, la8.modwt, 1)

# compute the original series with the level one coefficients
newX.dwt <- dwt.backward(wt.dwt$W, wt.dwt$V, la8.dwt)
newX.modwt <- modwt.backward(wt.modwt$W, wt.modwt$V, la8.modwt, 1)

wavelets

Functions for Computing Wavelet Filters, Wavelet Transforms and Multiresolution Analyses

v0.3-0.2
GPL (>= 2)
Authors
Eric Aldrich <ealdrich@gmail.com>
Initial release
2020-02-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.