From ripley at stats.ox.ac.uk  Wed Oct 22 12:51:46 2003
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Wed Oct 22 12:50:47 2003
Subject: [Rd] Something strange in cor.test in R-1.8.0 (PR#4718)
In-Reply-To: <200310221011.h9MABn0P009736@pubhealth.ku.dk>
Message-ID: <Pine.LNX.4.44.0310221143580.5414-100000@gannet.stats>

Without knowing the seed used it is impossible for us to reproduce this,
but I am not seeing anything strange.

Could you please reply with a reproducible example (and list the data used 
too, in case the random number generation is the issue).


On Wed, 22 Oct 2003 i.wilson@maths.abdn.ac.uk wrote:

> 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
> 
> ______________________________________________
> R-devel@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-devel
> 
> 

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


[Rd] Something strange in cor.test in R-1.8.0 (PR#4718)
Prof Brian Ripley