runs.test(x, exact = FALSE, alternative = c("two.sided", "less", "greater"))
TRUE
or FALSE
(default) indicating whether an exact p-value should be computed. See 'Details' for the meaning of TRUE
.
"two.sided"
(default), "less"
, or "greater"
. See 'Details' for the meanings of the possible values.
"exact = F"
or "exact = FALSE"
in this case.exact = TRUE
) with mean $2mn/(m + n) +1$ and variance $2mn(2mn - m - n)/((m + n)^2*(m + n - 1))$. The null of randomness is tested against the "under-mixing" trend and "over-mixing" trend by using alternative "less"
and "greater"
. Missing values have been removed.
Wu, X. and Zhao, B. (2013). Nonparametric Statistics (Fourth Edition ed). China Statistics Press. pp. 40-42.
x <- rnorm(100)
runs.test(x)
y <- c(12.85, 13.29, 12.41, 15.21, 14.23, 13.56)
runs.test(y, exact = TRUE)
Run the code above in your browser using DataLab