# Re: [R] Simple General Statistics and R question (with 3 line example) - get z value from pairwise.wilcox.test

From: Uwe Ligges <ligges_at_statistik.tu-dortmund.de>
Date: Tue, 03 May 2011 10:39:04 +0200

On 03.05.2011 10:33, JP wrote:
> Thanks Uwe,
>
> How do I calculate the Z score and r value - please (once I have the p values)?

Actually you calculate the p value from the statistics rathger than vice versa. And pairwise.wilcox.test uses wilcox.test to calculate the separate tests and adjusts the p values for multiple testing later on. That's why I said you can manually run wilcox.test to get the separate statistics.

Uwe Ligges

>
> Many Thanks
> JP
>
>
>
> 2011/5/2 Uwe Ligges<ligges_at_statistik.tu-dortmund.de>:
>> To get the statsitics, you will have to run each wilcox.test manually. the
>> pairwise... version just extracts the p-values and adjusts them.
>>
>> Uwe Ligges
>>
>>
>> On 28.04.2011 15:18, JP wrote:
>>>
>>> Hi there,
>>>
>>> I am trying to do multiple pairwise Wilcoxon signed rank tests in a
>>> manner similar to:
>>>
>>> a<- c(runif(1000, min=1,max=50), rnorm(1000, 50), rnorm(1000, 49.9,
>>> 0.5), rgeom(1000, 0.5))
>>> b<- c(rep("group_a", 1000), rep("group_b", 1000), rep("group_c",
>>> 1000), rep("group_d", 1000))
>>> pairwise.wilcox.test(a, b, alternative="two.sided",
>>>
>>> This gives me the following output:
>>>
>>> group_a group_b group_c
>>> group_b<2e-16 - -
>>> group_c<2e-16 0.25 -
>>> group_d<2e-16<2e-16<2e-16
>>>
>>> (which is kind of expected since group_b and group_c have similar
>>> distributions)
>>>
>>> I have found that when doing a wilcoxon signed ranked test you should
>>> report:
>>>
>>> - The median value (and not the mean or sd, presumably because of the
>>> underlying potential non normal distribution)
>>> - The Z score (or value)
>>> - r
>>> - p value
>>>
>>> My questions are:
>>>
>>> - Are the above enough/correct values to report (some places even
>>> quote W and df) ? What else would you suggest?
>>> - How do I calculate the Z score and r for the above example?
>>> - How do I get each statistic from the pairwise.wilcox.test call?
>>>
>>> Many Thanks
>>> JP
>>>
>>> ______________________________________________
>>> R-help_at_r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-help