runs.test

0th

Percentile

Runs Test

Computes the runs test statistic for the null of independence for the series x.

Keywords
ts
Usage
runs.test(x)
Arguments
x
a numeric vector or time series.
Details

This test searches for independence in the observed series by examining the frequency of runs. Before computing the statistic, zero values of x are eliminated. Missing values are not allowed.

Value

  • A list with class "htest" containing the following components:
  • statisticthe value of the test statistic.
  • p.valuethe p-value of the test.
  • methoda character string indicating what type of test was performed.
  • data.namea character string giving the name of the data.

References

J. B. Cromwell, W. C. Labys and M. Terraza (1994): Univariate Tests for Time Series Models, Sage, Thousand Oaks, CA, 28--30.

Aliases
  • runs.test
Examples
x <- rnorm(100)  # no runs
runs.test(x)

x <- 1:100  # one big run
runs.test(x)
Documentation reproduced from package tseries, version 0.8-3, License: GPL (see file COPYING), except for ./src/muin2ser.f and ./misc which are free for non-commercial purposes. See file README for details.

Community examples

Looks like there are no examples yet.