Let \(j, t\) be the decomposition level, and time index, respectively, and \(s_{0,t}=X_{t=0}^{N-1}\) where \(X_t\) is a real-valued uniformly-sampled time series. The \(j^{th}\) level MODWT wavelet coefficients \(\tilde{d}_{j,t}\) and scaling coefficients \(\tilde{s}_{j,t}\) are defined as \(\tilde{d}_{j,t} \equiv \sum_{l=0}^{L-1}\widetilde{h}_l \tilde{s}_{j-1, t - 2^{j-1}\;l \mbox{ mod }N,}\) and \(\tilde{s}_{j,t} \equiv \sum_{l=0}^{L-1}\widetilde{g}_l \tilde{s}_{j-1, t - 2^{j-1}\;l \mbox{ mod }N}\) The variable \(L\) is the length of both the scaling filter \((g)\) and wavelet filter \((h)\). The \(\tilde{d}_{j,t}\) and \(\tilde{s}_{j,t}\) are the wavelet and scaling coefficients, respectively, at decomposition level \(j\) and time index \(t\). The MODWT is a collection of all wavelet coefficients and the scaling coefficients at the last level: \(\mathbf{\tilde{d}_1,\tilde{d}_2},\ldots,\mathbf{\tilde{d}_J,\tilde{s}_J}\) where \(\mathbf{\tilde{d}_j}\) and \(\mathbf{\tilde{s}_j}\) denote a collection of wavelet and scaling coefficients, respectively, at level \(j\).
wavMODWT(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(), keep.series=FALSE)
a vector containing a uniformly-sampled real-valued time series.
a character string used to describe the input
data
. Default: character()
.
a logical value. If TRUE
, the original series
is preserved in the output object. Default: FALSE
.
the number of decomposition levels. Default: as.integer(floor(logb(length(x),base=2)))
.
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())
.
a character string representing the name of the input
data
. Default: character()
.
a string denoting the units of the time series. Default: character()
(no units).
a character string denoting the filter type.
See wavDaubechies
for details. Default: "s8"
.
an object of class wavTransform
.
The MODWT is a non-decimated form of the discrete wavelet transform (DWT)
having many advantages over the DWT including the ability
to handle arbitrary length sequences and shift invariance (while the
wavDWT
function can handle arbitrary length
sequences, it does so by means of an ad hoc storage sytem for odd length
scaling coefficient crystals. The MODWT needs no such scheme and is
more robust in this respect). The cost of
the MODWT is in its redundancy. For an \(N\)
point input sequence, there are \(N\) wavelet
coefficients per scale. However, the number of multiplication operations is
\(O(N \log_2(N))\) which is the same as
the fast Fourier transform, and is acceptably fast for most situations.
D. B. Percival and A. T. Walden, Wavelet Methods for Time Series Analysis, Cambridge University Press, 2000.
reconstruct
, wavDaubechies
, wavDWT
, wavMODWPT
, wavDictionary
, wavIndex
, wavTitle
, wavBoundary
.
# NOT RUN {
## calculate the MODWT of linear chirp
linchirp <- make.signal("linchirp", n=1024)
result <- wavMODWT(linchirp, wavelet="s8", n.levels=5, keep.series=TRUE)
## plot the transform shifted for approximate zero
## phase alignment
plot(wavShift(result))
## plot summary
eda.plot(result)
## summarize the transform
summary(result)
# }
Run the code above in your browser using DataLab