wavDWPT: The discrete wavelet packet transform (DWPT)

Description Usage Arguments Value References See Also Examples

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(u(n,l) * W(j-1, floor(n/2), 2t+1-l mod N(j-1))),

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)=X(t) where X is the original time series.

Usage

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

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

Example output

         Min     1Q  Median      3Q     Max    Mean      SD       Var     MAD
w0.0   0.000 15.700  42.000  74.925 253.800  51.266  43.449  1887.813  42.106
w1.0  -2.342 22.751  59.355 104.170 326.385  72.501  60.413  3649.694  58.309
w1.1 -51.099 -5.050   0.055   6.050  49.394   0.371  11.275   127.134   8.226
w2.0  -2.843 30.052  86.343 145.268 449.727 102.532  84.003  7056.458  84.693
w2.1 -61.447 -7.320  -0.098   7.222  95.369   0.392  15.747   247.961  10.751
w2.2 -58.954 -6.230  -0.043   6.163  49.204   0.105  12.084   146.013   9.202
w2.3 -44.875 -5.124   0.677   6.081  36.283   0.525  10.413   108.424   8.310
w3.0  -3.449 42.995 125.793 204.120 593.154 144.897 117.296 13758.459 122.805
w3.1 -83.653 -7.330   0.401  10.151  66.374   0.917  19.647   385.985  12.825
w3.2 -69.078 -7.930   0.014   7.366 100.829  -0.662  16.369   267.929  11.377
w3.3 -48.879 -7.007   0.430   7.121  82.030   0.583  15.114   228.427  10.850
w3.4 -34.798 -6.909   0.099   6.285  47.774   0.064  12.526   156.905  10.026
w3.5 -36.626 -6.955  -0.154   6.259  43.727  -0.108  11.438   130.817   9.675
w3.6 -43.461 -5.247   0.583   7.103  45.456   0.618  10.335   106.807   9.244
w3.7 -41.636 -4.704   0.946   6.030  35.020   0.752  10.498   110.213   7.928
     Energy %
w0.0   25.013
w1.0   24.661
w1.1    0.352
w2.0   24.317
w2.1    0.343
w2.2    0.202
w2.3    0.150
w3.0   24.004
w3.1    0.267
w3.2    0.185
w3.3    0.158
w3.4    0.108
w3.5    0.090
w3.6    0.074
w3.7    0.076

Energy Distribution:
             1st      1%      2%      3%      4%      5%      10%      15%
Energy %   0.691  24.842  36.877  45.361  52.066  57.630   75.971   85.919
|coeffs| 593.154 258.691 210.684 183.587 164.700 153.308  108.618   82.500
#coeffs    1.000 113.000 226.000 339.000 452.000 564.000 1128.000 1692.000
              20%      25%
Energy %   91.745   95.158
|coeffs|   62.960   48.000
#coeffs  2256.000 2819.000

wmtsa documentation built on May 2, 2019, 5:37 a.m.