cor.test is giving Pr(x<0.6), SuppDists is giving Pr(x<=0.6). My
recollection is that it is the custom in R for discrete distributions to
include the point in the left tail.
Drew Hoysak wrote:> cor.test and SuppDists give me different P-values for the same
> Spearman's rho. Which is correct, or am I doing something wrong?
>
>
>
>
>>x <- c(44.4, 45.9, 41.9, 53.3, 44.7, 44.1, 50.7, 45.2, 60.1)
>>y <- c( 2.6, 3.1, 2.5, 5.0, 3.6, 4.0, 5.2, 2.8, 3.8)
>
>
>>cor.test(x,y,method="spearman")
>
>
> Spearman's rank correlation rho
>
> data: x and y
> S = 48, p-value = 0.0968
> alternative hypothesis: true rho is not equal to 0
> sample estimates:
> rho
> 0.6
>
>
>
>>2*(1-pSpearman(.6,9))
>
> [1] 0.08572531
>
>
>
>
>
> Drew Hoysak
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
>
--
Bob Wheeler --- http://www.bobwheeler.com/
ECHIP, Inc. ---
Randomness comes in bunches.