wmtsa (version 2.0-3)

wavVarTest: Homogeneity test for discrete wavelet transform crystals

Description

Tests for homogeneity of variance for each scale of a discrete wavelet transform (DWT) decomposition. Based on the assumption that the DWT decorrelates colored noise processes, the interior wavelet coefficients in a given scale (\({\mathbf d}_j^{int}\)) can be regarded as a zero mean Gaussian white noise process. For a homogeneous distribution of \({\mathbf d}_j^{int}\), there is an expected linear increase in the cumulative energy as a function of time. The so called D-statistic denotes the maximum deviation of the \({\mathbf d}_j^{int}\) from a hypothetical linear cumulative energy trend. This D-statistic is then compared to a table of critical D-statistics that defines the distribution of D for various sample sizes. Comparing the D-statistic of \({\mathbf d}_j^{int}\) to the corresponding critical values provides a means of quantitatively rejecting or accepting the linear cumulative energy hypothesis. This function performs this test for an ensemble of distribution probabilities.

Usage

wavVarTest(x, wavelet="s8", n.levels=NULL,
    significance=c(0.1,0.05,0.01), lookup=TRUE, n.realization=10000,
    n.repetition=3, tolerance=1e-6)

Arguments

x

an object of class wavTransform as output by the wavDWT function, a corresponding wavBoundary object, or a numeric vector. In the latter case, wavDWT parameters can be passed to specify the type of wavelet to use and the number of decomposition levels to perform.

lookup

a logical flag for accessing precalculated critical D-statistics. The critical D-statistics are calculated for a variety of sample sizes and significances. If lookup is TRUE, this table is accessed. The table is stored as the matrix object D.table.critical and is loaded with the package. Missing table values are calculated using the input arguments: n.realization, n.repetition and tolerance. Default: TRUE.

n.levels

the number of decomposition levels. Valid only for input not of class wavTransform or wavBoundary. Default: the maximum decomposition level that contains at least one interior wavelet coefficient.

n.realization

an integer specifying the number of realizations to generate in a Monte Carlo simulation for calculating the D-statistic(s). This parameter is used either when lookup is FALSE, or when lookup is TRUE and the table is missing values corresponding to the specified significances. Default: 10000.

n.repetition

an integer specifying the number of Monte Carlo simulations to perform. This parameter is coordinated with the n.realization parameter. Default: 3.

significance

a numeric vector of real values on the interval (0,1). Qualitatively the significance is the fraction of times that the linear cumulative energy hypothesis is incorrectly rejected. It is equal to the difference of the distribution probability (p) and unity. Default: c(0.1, 0.05, 0.01).

tolerance

a numeric real scalar that specifies the amplitude threshold to use in estimating critical D-statistic(s) via the Inclan-Tiao approximation. Setting this parameter to a higher value results in a lesser number of summation terms at the expense of obtaining a less accurate approximation. Default: 1e-6.

wavelet

a character string denoting the filter type. Valid only for input not of class wavTransform or wavBoundary. Default: "s8".

Value

an object of class wavVarTest.

Details

An Inclan-Tiao approximation of critical D-statistics is used for sample sizes \(N \ge 128\) while a Monte Carlo technique is used for \(N < 128\). For the Monte Carlo technique, the D-statistic for a Gaussian white noise sequence of length N is calculated. This process is repeated n.realization times, forming a distribution of the D-statistic. The critical values corresponding to the significances are calculated a total of n.repetition times, and averaged to form an approximation to the D-statistic(s). Because the Monte Carlo study can be both computationally and memory intensive, it is highly recommended that lookup be set to TRUE, its default value.

References

D. B. Percival and A. T. Walden, Wavelet Methods for Time Series Analysis, Cambridge University Press, 2000.

See Also

wavVar, wavDWT, D.table.

Examples

Run this code
# NOT RUN {
## perform a homogeneity of variance test for a 
## DWT decomposition of a long memory process 
## realization 
homogeneity <- wavVarTest(fdp045)
# }

Run the code above in your browser using DataLab