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
latex{Cram'er}{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
latex{Cram'er}{Cramer}-von Mises test.
lower.tail
Logical. If TRUE (the default),
probabilities are $P(X \le q)$,
and otherwise they are $P(X > q)$.
Value
A numeric vector of the same length as p or q.
Details
For finite n the cumulative distribution function is
approximated by the first order expansion
$V(x) + \psi_1(x)/n$,
equation (1.8) of
latex{Cs"org"o}{Csorgo} and Faraway (1996).
latex{Cs"orgo}{Csorgo}, S. and Faraway, J.J. (1996)
The exact and asymptotic distributions of
latex{Cram'er}{Cramer}-von Mises statistics.
Journal of the Royal Statistical Society, Series B58, 221--234.