ad.pval {kSamples} | R Documentation |
-Value for the Asymptotic Anderson-Darling Test Distribution
Description
This function computes upper tail probabilities for the limiting distribution of the standardized Anderson-Darling test statistic.
Usage
ad.pval(tx,m,version=1)
Arguments
tx |
a vector of desired thresholds |
m |
The degrees of freedom for the asymptotic standardized Anderson-Darling test statistic |
version |
|
Details
Extensive simulations (sampling from a common continuous distribution)
were used to extend the range of the asymptotic
-value calculation from the original
in Table 1 of the reference paper
to 36 quantiles corresponding to
= .00001, .00005, .0001, .0005, .001, .005, .01, .025,
.05, .075, .1, .2, .3, .4, .5, .6, .7, .8, .9, .925, .95, .975, .99, .9925, .995, .9975, .999,
.99925, .9995, .99975, .9999, .999925, .99995, .999975, .99999. Note that the entries of the original Table 1
were obtained by using the first 4 moments of the asymptotic distribution and a
Pearson curve approximation.
Using ad.test
,
1 million replications of the standardized statistics with sample sizes
,
were run for
(
was done twice).
These values of
correspond to degrees of freedom
in the asymptotic distribution. The random variable described by this
distribution is denoted by
.
The actual variances (for
) agreed fairly well with the asymptotic variances.
Using the convolution nature of the asymptotic distribution, the performed simulations
were exploited to result in an effective simulation of 2 million cases, except for
, i.e.,
, for which the asymptotic distribution of
was approximated by the sum of the
statistics for
and
,
for just the 1 million cases run for each
.
The interpolation of tail
probabilities
for any desired
is done in two stages. First, a spline in
is
fitted to each of the 36 quantiles obtained for
to obtain
the corresponding interpolated quantiles for the
in question.
Then a spline is fitted
to the as a function of these 36 interpolated quantiles. This latter
spline is used to determine the tail probabilities
for the
specified threshold
tx
, corresponding to either
statistic version. The above procedure is based on simulations for either version
of the test statistic,
appealing to the same limiting distribution.
Value
a vector of upper tail probabilities corresponding to tx
References
Scholz, F. W. and Stephens, M. A. (1987), K-sample Anderson-Darling Tests, Journal of the American Statistical Association, Vol 82, No. 399, 918–924.
See Also
Examples
ad.pval(tx=c(3.124,5.65),m=2,version=1)
ad.pval(tx=c(3.124,5.65),m=2,version=2)