wm.test: Wallis and Moore Phase-Frequency Test

View source: R/wm.test.R

wm.testR Documentation

Wallis and Moore Phase-Frequency Test

Description

Performes the non-parametric Wallis and Moore phase-frequency test for testing the H0-hypothesis, whether the series comprises random data, against the HA-Hypothesis, that the series is significantly different from randomness (two-sided test).

Usage

wm.test(x)

Arguments

x

a vector or a time series object of class "ts"

Details

The test statistic of the phase-frequency test for n > 30 is calculated as:

z = \frac{| h - \frac{2 n - 7}{3}|}{\sqrt{\frac{16 n - 29}{90}}}

where h denotes the number of phases, whereas the first and the last phase is not accounted. The z-statistic is normally distributed. For n \le 30 a continuity correction of -0.5 is included in the denominator.

Value

An object of class "htest"

method

a character string indicating the chosen test

data.name

a character string giving the name(s) of the data

statistic

the Wallis and Moore z-value

alternative

a character string describing the alternative hypothesis

p.value

the p-value for the test

Note

NA values are omitted. Many ties in the series will lead to reject H0 in the present test.

References

L. Sachs (1997), Angewandte Statistik. Berlin: Springer.

C.-D. Schoenwiese (1992), Praktische Statistik. Berlin: Gebr. Borntraeger.

W. A. Wallis and G. H. Moore (1941): A significance test for time series and other ordered observations. Tech. Rep. 1. National Bureau of Economic Research. New York.

See Also

mk.test

Examples

## Example from Schoenwiese (1992, p. 113)
## Number of frost days in April at Munich from 1957 to 1968
## z = -0.124, Accept H0
frost <- ts(data=c(9,12,4,3,0,4,2,1,4,2,9,7), start=1957)
wm.test(frost)

## Example from Sachs (1997, p. 486)
## z = 2.56, Reject H0 on a level of p < 0.05
x <- c(5,6,2,3,5,6,4,3,7,8,9,7,5,3,4,7,3,5,6,7,8,9)
wm.test(x)

wm.test(nottem)


trend documentation built on Oct. 10, 2023, 9:06 a.m.