Re: [R] stratified Wilcoxon available?

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Mon 29 Aug 2005 - 03:31:38 EST

Heinz Tuechler <tuechler@gmx.at> writes:

> Dear All,
>
> is there a stratified version of the Wilcoxon test (also known as van
> Elteren test) available in R?
> I could find it in the survdiff function of the survival package for
> censored data. I think, it should be possible to use this function creating
> a dummy censoring indicator and setting it to not censored, but may be
> there is a better way to perform the test.

Not easily, I think. I played with the stratified Kruskal Wallis test (which is the same thing for larger values of 2...) with a grad student some years ago, but we never got it integrated as an "official" R function.

It was not massively hard to code, as I recall it. Basically, you convert observations to within-stratum ranks, scaled so that the scores have similar variance (this is crucial: just adding the per-stratum rank sums won't work). You can then get the relevant SSD from lm(), by comparing the models "r ~ group + strata" and "r ~ strata". This SSD can be looked up as a chi-square statistic, possibly after applying a scale factor which I have forgotten.... (I.e. do your own math, don't trust me!)

-- 
   O__  ---- Peter Dalgaard             ุster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)                  FAX: (+45) 35327907

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Mon Aug 29 03:40:35 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:39:57 EST