[R] Finding the Degrees of Freedom in a Wilcoxon Test
David Winsemius
dwinsemius at comcast.net
Sun Nov 25 21:39:24 CET 2012
On Nov 25, 2012, at 4:55 AM, sm2284 wrote:
> Dear R-ers,
>
> I am currently running some Wilcoxon tests in R-64.
>
> How do I find the degrees of freedom in the output I am receiving?
>
>> wilcox.test(good$TRUE, good$x4a, paired=FALSE)
>
> Wilcoxon rank sum test with continuity correction
>
> data: good$TRUE and good$x4a
> W = 2455, p-value < 2.2e-16
> alternative hypothesis: true location shift is not equal to 0
>
When using wilcox.test with two samples, the function passes some
version of the Rank-Sum statistic W to the pwilcox function followed
by the lengths of the two vectors. So I suppose you could say the
sample sizes are the "degrees of freedom". Reasoning informally I
would think the smaller of those lengths would be the most important
in determining stability of the inference.
BTW, methinks it a very questionable practice to name a column 'TRUE'.
--
David Winsemius, MD
Alameda, CA, USA
More information about the R-help
mailing list