# [Rd] ks.test (PR#1004)

**charlie@muskrat.stat.umn.edu
**
charlie@muskrat.stat.umn.edu

*Sat, 27 Oct 2001 00:10:14 +0200 (MET DST)*

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)
>* X <- read.table(url("http://www.stat.umn.edu/geyer/5601/hwdata/t5-7.txt"),
*+ header = TRUE)
>* names(X)
*[1] "x" "y"
>* attach(X)
*>* ks.test(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
>* ks.test(x, y, exact = FALSE)
*
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.
--
Charles Geyer
Professor, School of Statistics
University of Minnesota
charlie@stat.umn.edu
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._