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

pCvM

Null Distribution of Cramer-von Mises Test Statistic


Description

pCvM computes the cumulative distribution function, and qCvM computes the quantile function, of the null distribution of the Cramer-von Mises test statistic.

Usage

pCvM(q, n = Inf, lower.tail = TRUE)
  qCvM(p, n = Inf, lower.tail = TRUE)

Arguments

q

Numeric vector of quantiles (values for which the cumulative probability is required).

p

Numeric vector of probabilities.

n

Integer. Sample size for the Cramer-von Mises test.

lower.tail

Logical. If TRUE (the default), probabilities are P(X <= q), and otherwise they are P(X > q).

Details

For finite n the cumulative distribution function is approximated by the first order expansion V(x) + psi1(x)/n, equation (1.8) of Csorgo and Faraway (1996).

qCvM uses uniroot to find the quantiles.

Value

A numeric vector of the same length as p or q.

Author(s)

Original Matlab code by Julian Faraway, translated to R by Adrian Baddeley.

References

Csorgo, S. and Faraway, J.J. (1996) The exact and asymptotic distributions of Cramer-von Mises statistics. Journal of the Royal Statistical Society, Series B 58, 221–234.

See Also

Examples

pCvM(1.1, n=5)
  pCvM(1.1)

  qCvM(0.5, n=5)
  qCvM(0.5)

goftest

Classical Goodness-of-Fit Tests for Univariate Distributions

v1.2-2
GPL (>= 2)
Authors
Julian Faraway [aut], George Marsaglia [aut], John Marsaglia [aut], Adrian Baddeley [aut, cre]
Initial release
2019-11-27

We don't support your browser anymore

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