hwwntest-package: Tests of White Noise using Wavelets

hwwntest-packageR Documentation

Tests of White Noise using Wavelets

Description

Provides methods to test whether time series is consistent with white noise. Two new tests based on Haar wavelets and general wavelets described by Nason and Savchev (2014) <doi:10.1002/sta4.69> are provided and, for comparison purposes this package also implements the B test of Bartlett (1967) <doi:10.2307/2333850>. Functionality is provided to compute an approximation to the theoretical power of the general wavelet test in the case of general ARMA alternatives.

Details

The DESCRIPTION file: This package was not yet installed at build time.
Index: This package was not yet installed at build time.

Contains a variety of hypothesis tests for white noise data. The package contains an implementation of Bartlett's B test, bartlettB.test, (Kolmogorov-Smirnov test on the cumulative periodogram), a selection of wavelet-based tests hwwn.test a test using Haar wavelets, d00.test a single Haar wavelet coefficient test, genwwn.test a test using smoother Daubechies wavelets, a hybrid test hywavwn.test that uses Haar wavelets at fine scales and general wavelets at coarse scales and a omnibus test hywn.test that combines the results of four tests (hwwn.test, genwwn.test, bartlettB.test and the Box.test) The wavelet tests work by examining the wavelet transform of the regular periodogram and assess whether it has non-zero coefficients. If series is H_0: white noise, then the underlying spectrum is constant (flat) and all true wavelet coefficients will be zero. Then all periodogram wavelet coefficients will have true zero mean which can be tested using knowledge of, or approximation to, the coefficient distribution.

Author(s)

Delyan Savchev [aut], Guy Nason [aut, cre]

Maintainer: Guy Nason <g.nason@imperial.ac.uk>

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

hwwn.test

Examples

 # Invent test data set which IS white noise
     #
     x <- rnorm(128)
     #
     # Do the test
     #
     x.wntest <- hwwn.test(x)
     #
     # Print the results
     #
     #x.wntest
     #
     #       Wavelet Test of White Noise
     #
     #data:
     #p-value = 0.9606
     #
     # So p-value indicates that there is no evidence for rejection of
     # H_0: white noise.
     #
     # Let's do an example using data that is not white noise. E.g. AR(1)
     #
     x.ar <- arima.sim(n=128, model=list(ar=0.8))
     #
     # Do the test
     #
     x.ar.wntest <- hwwn.test(x.ar)
     #
     # Print the results
     #
     print(x.ar.wntest)
     #
     #       Wavelet Test of White Noise
     #
     #data:
     #p-value < 2.2e-16
     #
     # p-value is very small. Extremely strong evidence
     # to reject H_0: white noise
     #
     #
     # Let's use one of the other tests: e.g. the general wavelet one
     #
     x.ar.genwwntest <- genwwn.test(x.ar)
     #
     # Print the results
     #
     print(x.ar.genwwntest)
     #
     #
     #  Wavelet Test of White Noise
     #
     # data:
     # p-value = 1.181e-10
     #
     # Again, p-value is very small

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