Learn R Programming

randtests (version 1.0.1)

BartelsRank: Distribution of the Bartels Rank Test Statistic NM

Description

Probability function, distribution function for the distribution of the Bartels Rank statistic NM, for a sample of size \(n\).

Usage

dbartelsrank(x, n, log = FALSE)
pbartelsrank(q, n, lower.tail = TRUE, log.p = FALSE)

Arguments

x, q

a numeric vector of quantiles.

n

number of observations to return.

log, log.p

logical; if TRUE, probabilities p are given as log(p).

lower.tail

logical; if TRUE (default), probabilities are P[X \(\le\) x] otherwise, P[X > x].

Value

dbartelsrank gives the probability function and pbartelsrank gives the distribution function.

Warning

This function can use large amounts of memory and stack (and even crash R if the stack limit is exceeded) if the sample size \(n\) is large.

References

Bartels, R. (1982). The Rank Version of von Neumann's Ratio Test for Randomness, Journal of the American Statistical Association, 77(377), 40--46.

Gibbons, J.D. and Chakraborti, S. (2003). Nonparametric Statistical Inference, 4th ed. (pp. 97--98). URL: http://books.google.pt/books?id=dPhtioXwI9cC&lpg=PA97&ots=ZGaQCmuEUq

See Also

bartels.rank.test to calculate the value of the statistic NM from data.