genwwn.test: White noise test using general wavelets.

genwwn.testR Documentation

White noise test using general wavelets.

Description

Performs test for white noise using a general wavelet decomposition of a normalized periodogram.

Usage

genwwn.test(x, away.from = "standard", lowlev = 0, plot.it = FALSE,
	stopeveryscale = FALSE, filter.number = 10,
	family = "DaubExPhase", mc.method = p.adjust.methods,
	mac.spread = 10, verbose = FALSE)

Arguments

x

The time series you wish to test (of dyadic length).

away.from

Number of fine scales to stay away from, see details below. If "standard" then this is automatically computed for sample sizes up to length of 1024. If you have a longer series then the test will still work but might not be quite as powerful (but probably not too bad either).

lowlev

The coarsest coefficient to evaluate. This should always be left at 0.

plot.it

If TRUE then a series of plots similar to the ones produced in the hwwn.test function is produced. See that help page for further details on what the plots show.

stopeveryscale

If TRUE then if plot.it=TRUE then a ‘scan’ is issued after every plot. Just hit RETURN to continue.

filter.number

The number of vanishing moments of the wavelet used to compute coefficients that are then evaluated to see whether they are zero. In principle, best compression for a sparse evaluation of the normalized spectrum should mean we use the smoothest wavelets with the highest number of vanishing moments which is ten. The other components of the function are optimized for ten vanishing moments. The function will still work for other numbers of vanishing moments but maybe with slightly reduced power.

family

Wavelet family to go with filter.number.

mc.method

The type of multiple hypothesis correction, see p.adjust for details.

mac.spread

Horizontal range for plotting of wavelet coefficients, only used if plot.it=TRUE.

verbose

If TRUE some information messages are printed.

Details

This function computes the normalized periodogram, and then subjects it to a wavelet transform with respect to any wavelet (in wavethresh). Under the null hypothesis of white noise the coefficients should all close to zero and this function works out, for each coefficient, how close statistically it is to zero by assuming a Gaussian null distribution with mean zero and variance one. Then the multiple p-values from each of these tests are adjusted for multiple hypothesis test by using the p.adjust function before returning an overall p-value for the test. The test has been optimized for using the filter.number=10 wavelet and away.from="standard", but should work pretty well for other wavelets and even away.from values of more than 2-3 for moderate numbers of scales, and potentially higher for longer data sets.

An approximation to the theoretical power of this test can be obtained using the genwwn.thpower function.

Value

An object of class htest with the following components.

p.val.collector

All the of unadjusted p-values

p.val.adjust

All of the adjusted p-values

p.value

The overall p-value of the test

method

A text string describing the test

Author(s)

Delyan Savchev and Guy Nason

References

Nason, G.P. and Savchev, D. (2014) White noise testing using wavelets. Stat, 3, 351-362. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/sta4.69")}

See Also

compute.rejection, genwwn.thpower

Examples

#
# Generate test set, of dyadic length
#
x <- rnorm(64)
#
# Do the test:
#
answer <- genwwn.test(x)
#
# What do we get?
#
#answer
#
#	Wavelet Test of White Noise
#
#data:  
#p-value = 0.4629

hwwntest documentation built on Sept. 13, 2023, 9:06 a.m.