Skip to content
Prev 5764 / 63421 Next

(PR#1007) [Rd] ks.test doesn't compute correct empirical

On Sun, 1 Jul 2001 mcdowella@mcdowella.demon.co.uk wrote:

            
Please upgrade: we've found a number of Win2k bugs and worked around them
since then, let alone teh bug fixes and improvements in R ....
You do realize that the Kolmogorov tests (and the Kolmogorov-Smirnov
extension) assume continuous distributions, so the distribution theory
is not valid in this case?

S-PLUS does stop you doing this:
Problem in not.cont1(ttest = d.test, nx = nx, alt.ex..: For testing
discrete distributions when sample size > 50, use the
       Chi-square test
That's OK.  That's not what you tested (see above).

An S language point: the `;' are unnecessary.
Nor does it change the maximum discrepancy.
One-sample Kolmogorov-Smirnov test

data:  rep(1, 10000)
D = 1, p-value = < 2.2e-16
alternative hypothesis: two.sided

shows 0 is special here.
Eh? Just type ks.test in your R session for the source ....