Skip to content
Prev 6345 / 63421 Next

ks.test (PR#1004)

The note to 1004 says "fixed for 1.3.1"

Uh.  No.  It ain't.

The problem was more serious than guessed as even the simplest testing
would show.

For example, Example 5.4 in Hollander and Wolfe (Nonparametric Statistical,
Methods, 2nd ed., Wiley, 1999, pp. 180-181)

R Version 1.3.1 (SuSE Linux 7.1)
+     header = TRUE)
[1] "x" "y"
Two-sample Kolmogorov-Smirnov test
 
data:  x and y
D = 0.6, p-value = 0.01234
alternative hypothesis: two.sided

Not hardly.  Hollander and Wolfe say the exact P-value is 0.0524.  Note
Two-sample Kolmogorov-Smirnov test
 
data:  x and y
D = 0.6, p-value = 0.05465
alternative hypothesis: two.sided

Agrees.  Thus the algorithm for the exact null distribution of the two-sample
K-S test statistic is erroneous.  I. e., there is something wrong with the
function "psmirnov2x" in ks.c.  I don't yet know what the problem is.