Skip to contents

R arm of morie.fn.ksamp: the Scholz-Stephens (1987) k-sample Anderson-Darling statistic in its midrank (ties) form \(A^2_{akN}\), standardised \(T = (A^2_{akN} - (k - 1))/\sigma_N\) with the exact finite-sample variance, and the p-value interpolated as in scipy: a least-squares quadratic of the log significance levels in the Scholz- Stephens critical values, clipped to the range 0.001 to 0.25.

Usage

Ksamp(...)

Arguments

...

Two or more numeric samples.

Value

List with statistic (T), p_value, A2akN, critical_values, k, sample_sizes.

References

Scholz, F. W. and Stephens, M. A. (1987). K-sample Anderson-Darling tests. Journal of the American Statistical Association 82, 918-924.

Examples

Ksamp(c(0.1, 1.2, 0.5, 2.2, 1.9), c(3.1, 2.4, 4.2, 3.3, 2.9))$statistic
#> [1] 4.726015