wavMODWT: The maximal overlap discrete wavelet transform (MODWT)

Description Usage Arguments Details Value References See Also Examples

Description

Let j, t be the decomposition level, and time index, respectively, and s(0,t)=X(t) for t=0,...,N-1 where X(t) is a real-valued uniformly-sampled time series. The jth level MODWT wavelet coefficients d(j,t) and scaling coefficients s(j,t) are defined as d(j,t)=sum(h(l) s(j-1, t - 2^(j-1) l mod N)) and s(j,t)=sum(g(l) s(j-1, t - 2^(j-1) l mod N)) The variable L is the length of both the scaling filter (g) and wavelet filter (h). The d(j,t) and 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: d(1),d(2),...,d(J),s(J) where d(j) and s(j) denote a collection of wavelet and scaling coefficients, respectively, at level j.

Usage

1
2
3
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)

Arguments

x

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

documentation

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

keep.series

a logical value. If TRUE, the original series is preserved in the output object. Default: FALSE.

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".

Details

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 log2(N)) which is the same as the fast Fourier transform, and is acceptably fast for most situations.

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, wavDaubechies, wavDWT, wavMODWPT, wavDictionary, wavIndex, wavTitle, wavBoundary.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## 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)

Example output

      Min     1Q Median    3Q   Max Mean    SD   Var   MAD Energy %
d1 -0.132 -0.004  0.000 0.004 0.232 0.00 0.027 0.001 0.006    0.154
d2 -0.666 -0.044  0.000 0.047 0.666 0.00 0.212 0.045 0.068    9.165
d3 -0.932 -0.252  0.000 0.257 0.929 0.00 0.453 0.205 0.381   41.957
d4 -0.927 -0.108  0.000 0.114 0.929 0.00 0.353 0.124 0.164   25.412
d5 -0.915 -0.032  0.000 0.028 0.930 0.00 0.250 0.063 0.045   12.786
s5 -0.792 -0.009  0.001 0.012 1.028 0.03 0.225 0.051 0.015   10.527

Energy Distribution:
           1st     1%      2%      3%      4%      5%     10%     15%      20%
Energy % 0.211 10.883  20.264  28.946  36.635  43.716  69.621  84.613   92.691
|coeffs| 1.028  0.897   0.857   0.817   0.776   0.738   0.562   0.425    0.302
#coeffs  1.000 62.000 123.000 185.000 246.000 308.000 615.000 922.000 1229.000
              25%
Energy %   96.750
|coeffs|    0.212
#coeffs  1536.000

wmtsa documentation built on May 31, 2017, 5:05 a.m.

Related to wavMODWT in wmtsa...