Description Details Author(s) References See Also Examples

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.

Package: | hwwntest |

Type: | Package |

Version: | 1.0 |

Date: | 2014-03-21 |

License: | GPL-2 |

Delyan Savchev and Guy Nason. Maintainer: <[email protected]>

Nason, G.P. and Savchev, D. (2014) White noise testing using
wavelets. *Stat*, **3**, 351-362.
http://dx.doi.org/10.1002/sta4.69

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | ```
# 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
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.