The discrete wavelet variance is a useful alternative to the spectral density function (SDF) and is seen as an octaveband regularization of the SDF. The wavelet variance decomposes the variance of certain stochastic processes on a scalebyscale basis, and thus, is very appealing to the analyst studying physical phenomena which fluctuate both within and across a wide range of scale.
By definition, the wavelet variance involves an averaged energy summation of MODWT wavelet coefficients. While DWT wavelet coefficients can also be used, the statistical properties are inferior to those of the MODWT wavelet variance. See the references for more details.
The MODWT Wavelet Variance
Let N be the the number of samples in a time series X(t), L be the length of the wavelet filter, L(j)=(2^j1)(L1)+1 be the equivalent filter width at level $j$ in a MODWT, and tau(j)=2^(j1) be the scale of the data at level j for j=1,...,J. Then the unbiased wavelet variance is defined as
1/Mj * sum[t=L(j)1, ..., N1],
where d(j,t) are the MODWT coefficients at level j and time t, and Mj=N  L(j) + 1. The unbiased wavelet variance estimator avoids socalled boundary coefficients which are those coefficients subject to circular filter operations in a discrete wavelet transform. The biased estimator is defined as
1/N * sum[t=0,...,N1] (d(j,t))^2,
and includes the effects of the boundary coefficients.
The DWT Wavelet Variance
The DWT can also be used to calculate wavelet variance estimates, but is not preferred over the MODWT due to its poor statistical properties. Let N(j)= floor(N/2^j) be the number of DWT wavelet coefficients at level j, and L'(j)=ceiling((L2)(12^(j))) be the number of DWT boundary coefficients at level j (assuming N(j) > L'(j)). Then the DWT version of the unbiased wavelet variance is defined as
1/(N2^j * L'(j)) sum[t=L'(j)1,...,N(j)1] (d(j,t))^2,
where d(j,t) are the DWT coefficients at level j and time t. Similarly, the DWT version of the biased wavelet variance is defined as
1/N sum[t=0,...,N(j)1 (d(j,t))^2].
1 2 3 4 
x 
a vector containing a uniformlysampled realvalued time series. 
documentation 
a character string used to describe the input

n.fft 
a positive integer (greater than one) defining the number of frequencies to use in evaluating the SDF. The
frequencies are uniformly distributed over the interval [0, Nyquist] ala f=[0, 1/P , 2/P, 3/P, ..., (n.freq1)/P]
where P=2*(n.freq1)/sampling.interval. Only used when the input SDF is not 
n.levels 
the number of decomposition levels. Default: the maximum level at which there exists at least one interior wavelet coefficient. 
position 
a 
sampling.interval 
sampling interval of the time series. Default: 
sdf 
a spectral density function of the process corresponding to the input time series.
This input must be a function whose first argument is 
sdfargs 
a list of arguments passed directly to the SDF function ala

units 
a string denoting the units of the time series. Default: 
wavelet 
a character string denoting the filter type.
See 
xform 
a character string denoting the type of wavelet transform:
"modwt" or "dwt". Default: 
an object of class wavVar
.
D. B. Percival and A. T. Walden, Wavelet Methods for Time Series Analysis, Cambridge University Press, 2000.
wavVarTest
, wavEDOF
, wavVarConfidence
, mutilsSDF
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  ## create sequence
x < make.signal("doppler")
## perform a time independent wavelet variance
## analysis
vmod < wavVar(x)
## plot the result
plot(vmod, pch=15, title="Wavelet Variance of Doppler")
## calculate wavelet variance estimaates for the
## ocean series and calculate EDOF mode 2
## estimates and corresponding 95 percent
## confidence intervals
vocean < wavVar(ocean, sdf=oceansdf, wavelet="d6")
## summarize the results
plot(vocean, edof=1:3)
summary(vocean)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.