CV2.test {Renext} | R Documentation |
CV2 test of exponentiality
Description
Test of exponentiality based on the squared coefficient of variation.
Usage
CV2.test(x, method = c("num", "sim", "asymp"), nSamp = 15000)
Arguments
x |
Numeric vector giving the sample. |
method |
Method used to compute the |
nSamp |
Number of samples used to compute the |
Details
The distribution of \textrm{CV}^2
is that of
Greenwood's statistic up to normalising constants. It
approximately normal with expectation 1
and standard deviation
2/\sqrt{n}
for a large sample size n
. Yet the
convergence to the normal is known to be very slow.
Value
A list of test results.
statistic , p.value |
The test statistic, i.e. the squared coefficient of
variation |
df |
The sample size. |
method |
Description of the test method. |
Note
This test is sometimes referred to as Wilk's exponentiality
test or as WE1 test. It works quite well for a Lomax
alternative (i.e. GPD with shape \xi >0
), and hence can be
compared to Jackson's test and the Likelihood-Ratio (LR) test of
exponentiality. However, this test has lower power that of the two
others while having a comparable computation cost due to the
evaluation of the Greenwood's statistic distribution.
Author(s)
Yves Deville
References
S. Ascher (1990) "A Survey of Tests for Exponentiality" Commun. Statist. Theory Methods, 19(5), pp. 1811-1525.
See Also
The function CV2
that computes the statistic and
LRExp.test
or Jackson.test
for functions
implementing comparable tests or exponentiality with the same
arguments.
Examples
n <- 30; nSamp <- 500
X <- matrix(rexp(n * nSamp), nrow = nSamp, ncol = n)
pVals <- apply(X, 1, function(x) CV2.test(x)$p.value)
plot(pVals) ## should be uniform on (0, 1)