Skip to content

Finding the Degrees of Freedom in a Wilcoxon Test

8 messages · Uwe Ligges, chuck.01, David Winsemius +1 more

#
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?
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 


Thank you, 

Stephen.

University of St Andrews, 
sm2284 at st-andrews.ac.uk



--
View this message in context: http://r.789695.n4.nabble.com/Finding-the-Degrees-of-Freedom-in-a-Wilcoxon-Test-tp4650724.html
Sent from the R help mailing list archive at Nabble.com.
#
On 25.11.2012 13:55, sm2284 wrote:
You don't find any number related to degrees of freedom - which seems to 
be a bit out of context here?

Uwe Ligges
#
Thank you for that input. Is there any way of finding the degrees of freedom
for this test?

I'm new with R so thank you for your patience.



-----
University of St Andrews, 
sm2284 at st-andrews.ac.uk
--
View this message in context: http://r.789695.n4.nabble.com/Finding-the-Degrees-of-Freedom-in-a-Wilcoxon-Test-tp4650724p4650753.html
Sent from the R help mailing list archive at Nabble.com.
#
Please correct me if I am wrong, but I think degrees of freedom are, as Uwe
says "a bit out of context here".  The test procedures and the large sample
approximation for this test, which uses the standard normal distribution do
not require this. 


sm2284 wrote
--
View this message in context: http://r.789695.n4.nabble.com/Finding-the-Degrees-of-Freedom-in-a-Wilcoxon-Test-tp4650724p4650763.html
Sent from the R help mailing list archive at Nabble.com.
#
Dear Chuck and Uwe, 

Thank you very much for your replies.

Chuck-Thank you for the clarification I mis-read the reply

Uwe - Many apologies, I mis-understood your response.

Thank you very much for your help!
Stephen



-----
University of St Andrews, 
sm2284 at st-andrews.ac.uk
--
View this message in context: http://r.789695.n4.nabble.com/Finding-the-Degrees-of-Freedom-in-a-Wilcoxon-Test-tp4650724p4650764.html
Sent from the R help mailing list archive at Nabble.com.
#
On Nov 25, 2012, at 4:55 AM, sm2284 wrote:

            
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'.
#
On Nov 25, 2012, at 2:06 PM, sm2284 wrote:

            
It complicates the human interpretation of code to have reserved words  
(of which 'TRUE' is one) used as a name of an object (or an object  
element. You seen to be getting away with it because you are not  
reporting an error message, but it is deemed poor practice. If you  
have the fortunes package installed try typing:

fortunes::fortune("dog")

Usually it does cause the interpreter confusion if you only use  
function names as column names,  but I can create pathological results  
if I test for TRUE > 500 in a dataset where half of the rows should  
meet that criterion. Since TRUE becomes 1 when coerced to numeric, I  
get no rows from subset().