[R] alternatives to KS test applicable to K-samples

David Winsemius dwinsemius at comcast.net
Sat May 30 19:42:35 CEST 2015


On May 30, 2015, at 7:09 AM, Wensui Liu wrote:

> Thanks for your insight, David
> But I am not interested in comparing means among multiple groups.
> Instead, I want to compare empirical distributions. In this case, I am
> not sure if wilcoxon should be still applicable.
> 
> still appreciate it.

The Wilcoxon Rank Sum is not comparing means (or medians as I mistakenly thought in the past) but is a more general test of location. You are correct in thinking that the KS test is implicitly testing a wider range of hypotheses, although it remains fairly weak against specific tests. I wasn't suggesting the coin package simply because of its capacity to generalize the WRS test but because of its capacity to support permutation tests of many sorts. 

If you are testing at all, then there would seem to be a likelihood (in the vague sense of consideration of possible goals of your testing proces) that you really would be interested in departures from "equality of distribution" that might have a more specific description, and might therefore be interested in testing strategies with more power, perhaps a compound test for differences in location and spread.

-- 
David.

 
> 
> On Fri, May 29, 2015 at 1:32 PM, David Winsemius <dwinsemius at comcast.net> wrote:
>> 
>> On May 29, 2015, at 9:31 AM, Wensui Liu wrote:
>> 
>>> Good morning, All
>>> I have a stat question not specifically related to the the programming language.
>>> To compare distributional consistency / discrepancy between two
>>> samples, we usually use kolmogorov-smirnov test, which is implemented
>>> in R with ks.test() or in SAS with "pro npar1way edf".
>>> I am wondering if there is any alternative to KS test that could be
>>> generalized to K-samples.
>> 
>> The 'coin' package (Hothorn, Hornick, van de Weil, and Zeileis) presents a variety of permutation and rank-based tests that would probably be more powerful than any multi-group variant of the KS test. The multi-group variant of the Wilcoxon Rank Sum Test presented in the examples for the help page: ?wilcox_test is the Nemenyi-Damico-Wolfe-Dunn test.
>> 
>> --
>> 
>> David Winsemius
>> Alameda, CA, USA
>> 
> 
> 
> 
> -- 
> ==============================
> WenSui Liu
> Credit Risk Manager, 53 Bancorp
> wensui.liu at 53.com
> 513-295-4370
> ==============================

David Winsemius
Alameda, CA, USA



More information about the R-help mailing list