wavVar {wmtsa} | R Documentation |
The discrete wavelet variance is a useful alternative to the spectral density function (SDF) and is seen as an octave-band regularization of the SDF. The wavelet variance decomposes the variance of certain stochastic processes on a scale-by-scale 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^j-1)(L-1)+1 be the equivalent filter width at level $j$ in a MODWT, and tau(j)=2^(j-1) 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, ..., N-1],
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 so-called 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,...,N-1] (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((L-2)(1-2^(-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/(N-2^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].
wavVar(x, sdf=NULL, xform="modwt", wavelet= "s8", n.levels=NULL, position=list(from=1,by=1,units=character()), units=character(), documentation=character(), ...)
x |
a vector containing a uniformly-sampled real-valued time series. |
... |
optional arguments passed directly to the SDF function (if supplied). |
documentation |
a character string used to describe the input
data . Default: character() . |
n.levels |
the number of decomposition levels. Default: the maximum level at which there exists at least one interior wavelet coefficient. |
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()) . |
sdf |
a vector containing a discretized approximation
of the process spectral density function (SDF). The
coefficients of this argument should correspond
exactly with the normalized Fourier frequencies
f=[0, 1/P , 2/P, 3/P, ..., (M-1)/P], where
P=2*(M-1) and
M is the number of points in the SDF
vector. For example, if the sdf vector contains five
elements, the corresponding frequencies will be
f=[0, 1/8, 1/4, 3/8, 1/2].
This argument is used only for calculating mode 2 EDOF.
If the EDOF mode 2 estimates are not desired, specifying a NULL
for this argument and the EDOF mode 2 and corresponding confidence
intervals will not be calculated. Default: NULL . |
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" . |
xform |
a character string denoting the type of wavelet transform:
"modwt" or "dwt". Default: "modwt" . |
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
.
## 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)