Hi Roslina,
I believe that you can ignore the warning.
Alternatively, you may add a very small random noise to pairs with ties, i.e.
something like
xobs[which(duplicated(xobs))] <- xobs[which(duplicated(xobs))] +
1.0e-6*sd(xobs)*rnorm(length(which(duplicated(xobs))))
Regards,
Moshe.
--- On Tue, 13/10/09, Roslina Zakaria <zroslina at yahoo.com> wrote:
> From: Roslina Zakaria <zroslina at yahoo.com>
> Subject: [R] Kolmogorov smirnov test
> To: r-help at r-project.org
> Received: Tuesday, 13 October, 2009, 9:58 AM
>
> Hi r-users,
> ?
> I would like to use Kolmogorov smirnov test but in my
> observed data(xobs) there are ties.? I got the warning
> message.? My question is can I do something about it?
> ?
> ks.test(xobs, xsyn)
> ?
> ??????? Two-sample Kolmogorov-Smirnov test
> data:? xobs and xsyn
> D = 0.0502, p-value = 0.924
> alternative hypothesis: two-sided
>
> Warning message:
> In ks.test(xobs, xsyn) : cannot compute correct p-values
> with ties
> ?
> Thank you for all your help.
>
>
>
> ? ? ?
> ??? [[alternative HTML version deleted]]
>
>
> -----Inline Attachment Follows-----
>
> ______________________________________________
> 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.
>