runs.test: Runs test for randomness

Description Usage Arguments Value Examples

Description

Runs test for randomness

Usage

1
2
3
4
5
runs.test(
  y,
  plot.it = FALSE,
  alternative = c("two.sided", "positive.correlated", "negative.correlated")
)

Arguments

y

A vector

plot.it

A logical. whether or not draw a plot

alternative

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

Value

A list with class "htest" containing the following components: statistic,p-value,method and data.name

Examples

1
2
3
4
y=c(1,2,2,1,1,2,1,2)
runs.test(y)
y=c("A","B","B","A","A","B","A","B")
runs.test(y,alternative="p")

webr documentation built on March 26, 2020, 6:22 p.m.