From: David John Allwright <allwrigh@maths.ox.ac.uk> PARTS: 2 I am using R version 2.6.2 (2008-02-08) on a Ubuntu Linux system. I seemed to be finding occasional errors in the p-values produced by ks.test(a,b) when a and b were vectors of 10 to 20 values. So I tried to find simpler examples, and one that illustrates what I mean is included below and as the attached typescript file. It is just x<-1:5 y<-c(2.5,4.5) ks.test(x,y) The value of the D_2,5 statistic is calculated as 0.4 correctly, but the p-value is stated by R as 1, though in fact it should be 20/21=0.9524 As I say this is just one example of quite a lot of errors of this kind that I am finding. If you want more examples I can try to be more systematic about tracking them down. Thank you, David Allwright. ----------------------------------------------------------------------------- Dr DJ Allwright E-mail : allwrigh@maths.ox.ac.uk OCIAM(Oxford Centre for Industrial and Applied Mathematics) Mathematical Institute Telephone : [+44](0)1865-280604 24-29 St.Giles' FAX -270515 Oxford OX1 3LB, UK. ----------------------------------------------------------------------------- Script started on Tue 15 Dec 2009 16:49:46 GMT ]0;swamp-thing: ~/smithinst/be2swamp-thing:be2% R R version 2.6.2 (2008-02-08) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x<-1:5 > y<-c(2.5,4.5) > ks.test(x,y) Two-sample Kolmogorov-Smirnov test data: x and y D = 0.4, p-value = 1 alternative hypothesis: two-sided > q() Save workspace image? [y/n/c]: n ]0;swamp-thing: ~/smithinst/be2swamp-thing:be2% exit exit Script done on Tue 15 Dec 2009 16:50:13 GMT ------------------------------------------------------------------------------ (Attached 'typescript' of type 'TEXT/PLAIN') **END

Created attachment 946 [details]

NOTES: fixed in 2.10.1 patched: see PR14151

Audit (from Jitterbug): Fri Dec 18 07:30:15 2009 ripley changed notes Fri Dec 18 07:30:15 2009 ripley moved from incoming to Analyses-fixed Mon Dec 21 08:18:07 2009 ripley changed notes