[R] KS Test question (2)

Glen Barnett glnbrntt at gmail.com
Thu Aug 5 03:23:27 CEST 2010


It looks like the test is indicating a far bigger difference than
could be explained by random variation.

Since the sample sizes are equal, have you considered plotting the
ordered values of one against the ordered values of the other
(essentially an empirical QQplot), with a 45 degree line drawn in, to
examine the way(s) in which the two samples differ?


On Thu, Aug 5, 2010 at 7:49 AM, Ralf B <ralf.bierig at gmail.com> wrote:
> Hi R Users,
>
> I have two vectors, x and y, of equal length representing two types of
> data from two studies. I would like to test if they are similar enough
> to use them interchangeably. No assumptions about distributions can be
> made (initial tests clearly show that they are not normal).
> Here some result:
>
> Two-sample Kolmogorov-Smirnov test
>
> data:  x and y
> D = 0.1091, p-value < 2.2e-16
> alternative hypothesis: two-sided
>
> Warning message:
> In ks.test(x[1:nx], y[1:nx], exact = FALSE) :
>  cannot compute correct p-values with ties
>
> Here some questions:
>
> a) What does the error message means and what does it imply?
> b) The data is very noisy and the initial result shows that there is
> no relation between x and y. Is there a way to calculate and effect
> size?
> c) Can the p-value be used, when running tests over a large amount of
> different data sets, as a metric for ranking similarity between x and
> y data sets?
>
> Best
> R.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list