>>>>> "Duncan" == Duncan Murdoch <[EMAIL PROTECTED]>
>>>>>     on Wed, 22 Oct 2003 08:17:32 -0400 writes:

    Duncan> I've now tried the code 

 set.seed(1)
 x <- rnorm(50)
 y <- rnorm(50)
 cor.test(x,y,method="spearman")
 x <- rnorm(50)
 y <- rnorm(50)
 cor.test(x,y,method="spearman")

    Duncan> in r-patched (which gives apparently correct results), and r-devel,
    Duncan> which gives the first result correct, the second incorrect; when
    Duncan> repeated, both are bad.
Hmm,
funny.

I get repeatable results in in R 1.7.1 , 1.8.0, R-patched and
R-devel (all on Linux),

with an (ugly but convenient) 1-liner :

> set.seed(1); for(k in 1:2){x <- rnorm(50);y <- 
> rnorm(50);print(unlist(cor.test(x,y,method="spearman")[1:4]))}
  statistic.S       p.value  estimate.rho 
23640.0000000     0.3482088    -0.1351741 
 statistic.S      p.value estimate.rho 
1.724800e+04 2.322263e-01 1.717647e-01 

---
Martin Maechler <[EMAIL PROTECTED]>     http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16    Leonhardstr. 27
ETH (Federal Inst. Technology)  8092 Zurich     SWITZERLAND
phone: x-41-1-632-3408          fax: ...-1228                   <><

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-devel

Reply via email to