Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

wawotest

Wald-Wolfowitz Test of Randomness


Description

The function wawotest.default performs a Wald Wolfowitz test of the random distribution of the values in a vector. The function wawotest.ltraj performs this tests for the descriptive parameters dx, dy and dist in an object of class ltraj. The function wawotest is generic.

Usage

wawotest(x, ...)
## Default S3 method:
wawotest(x, alter = c("greater", "less"), ...)
## S3 method for class 'ltraj'
wawotest(x, ...)

Arguments

x

for wawotest.default, a vector containing the successive observations building the series. For wawotest.ltraj, an object of class ltraj.

alter

a character string specifying the alternative hypothesis, must be one of "greater" (default), "less" or "two-sided"

...

additional arguments to be passed to other functions

Details

The statistic of the test is equal to A = sum(y(i) y(i+1)), with y(N+1) = y(1). Under the hypothesis of a random distribution of the values in the vector, this statistic is normally distributed, with theoretical means and variances given in Wald & Wolfowitz (1943).

Value

wawotest.default returns a vector containing the value of the statistic (a), its esperance (ea), its variance (va), the normed statistic (za) and the P-value. wawotest.ltraj returns a table giving these values for the descriptive parameters of the trajectory.

Author(s)

References

Wald, A. & Wolfowitz, J. (1943) An exact test for randomness in the non-parametric case based on serial correlation. Ann. Math. Statist., 14, 378–388.

See Also

indmove and runsNAltraj for other tests of independence to be used with objects of class "ltraj"

Examples

data(puechcirc)
puechcirc
wawotest(puechcirc)

adehabitatLT

Analysis of Animal Movements

v0.3.25
GPL (>= 2)
Authors
Clement Calenge, contributions from Stephane Dray and Manuela Royer
Initial release
2020-01-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.