Learn R Programming

trend (version 0.1.0)

wm.test: 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"

Value

  • An object of class "htest"
  • methoda character string indicating the chosen test
  • data.namea character string giving the name(s) of the data
  • statisticthe Wallis and Moore z-value
  • alternativea character string describing the alternative hypothesis
  • p.valuethe p-value for the test

Note

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

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.

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

Run this code
## 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)

data(nottem)
wm.test(nottem)

data(maxau)
wm.test(maxau[, "s"])

Run the code above in your browser using DataLab