hywavwn.test: Hybrid wavelet test of white noise.

hywavwn.testR Documentation

Hybrid wavelet test of white noise.

Description

Combines the general wavelet test genwwn.test at the medium-coarse scales and the Haar wavelet test at fine scales.

Usage

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

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.

verbose

If TRUE some information messages are printed.

n.cdf.grid

The CDF of the Macdonald distribution is evaluated numerically. This argument controls the resolution of that grid: it controls the number of grid points there are between -mac.spread and mac.spread.

mac.spread

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

Details

The genwwn.test performs pretty well, but does not pick up departures from the null at the finest scale of wavelet coefficients because it does not look at those scales (because of the ‘away.from’ argument and the asymptotic normality that genwwn.test does not kick in at those finer scales). So, this test augments the genwwn.test with the finest scales results from hwwn.test. Those scales finer than away.from use the Haar wavelet and those coarser than away.from use the general wavelet.

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

p.val.collector.hw

The of unadjusted p-values from the Haar wavelet levels

p.val.collector.gw

The of unadjusted p-values from the general wavelet levels

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

genwwn.test, hwwn.test

Examples

#
# Test data
#
x <- rnorm(64)
#
# Do the test
#
answer <- hywavwn.test(x)
#
# The result in my case was:
#
#answer
#
#	Hybrid Wavelet Test of White Noise
#
#data:  
#p-value = 0.02305

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