Skip to content
Prev 377705 / 398502 Next

ks.test ; impossible to calculate exact exact value with ex-aequos

Hello,

That is a warning, not an error.
And it documented. In ?ks.test, section Details, the relevant part is


The presence of ties always generates a warning, since continuous 
distributions do not generate them. If the ties arose from rounding the 
tests may be approximately valid, but even modest amounts of rounding 
can have a significant effect on the calculated statistic.


It then adds, three paragraphs down:

Exact p-values are not available for the two-sample case if one-sided or 
in the presence of ties.


You can use exact = FALSE but it will still issue a warning.

ks.test(a, b, exact = FALSE)

	Two-sample Kolmogorov-Smirnov test

data:  a and b
D = 0.58333, p-value = 0.0337
alternative hypothesis: two-sided

Warning message:
In ks.test(a, b, exact = FALSE) :
   p-value will be approximate in the presence of ties



Hope this helps,

Rui Barradas
?s 21:17 de 10/12/2018, Fatma Ell escreveu: