From i.wilson at maths.abdn.ac.uk  Wed Oct 22 12:11:49 2003
From: i.wilson at maths.abdn.ac.uk (i.wilson@maths.abdn.ac.uk)
Date: Wed Oct 22 12:11:04 2003
Subject: [Rd] Something strange in cor.test in R-1.8.0 (PR#4718)
Message-ID: <200310221011.h9MABn0P009736@pubhealth.ku.dk>

Full_Name: Ian Wilson
Version: R-1.8.0
OS: Windows (but own compilation)
Submission from: (NULL) (139.133.7.38)



the p-value is incorrect for cor.test using method "spearman" in R-1.8.0.  This
was not the case in R-1.7.1.

Version R-1.8.0 on Windows 

> cor.test(rnorm(50),rnorm(50),method="spearman")

	Spearman's rank correlation rho

data:  rnorm(50) and rnorm(50) 
S = 20486, p-value = < 2.2e-16
alternative hypothesis: true rho is not equal to 0 
sample estimates:
       rho 
0.01627851 

> cor.test(rnorm(50),rnorm(50),method="spearman")

	Spearman's rank correlation rho

data:  rnorm(50) and rnorm(50) 
S = 22006, p-value = 1
alternative hypothesis: true rho is not equal to 0 
sample estimates:
        rho 
-0.05671068


[Rd] Something strange in cor.test in R-1.8.0 (PR#4718)
i.wilson@maths.abdn.ac.uk