Dear Frank and Felipe,

Thank you both for your replies.  The code looks exactly like the 
formula in Japanese wikipedia which I was trying to make sense of (as it 
wasn't in English wikipedia).  Thank you for sharing your code with, Felipe!

And the clarification, Frank.  Knowing many ways of calculating it helps 
understanding it...thanks to both of you!

Ray


Frank E Harrell Jr wrote:
> Mendiburu, Felipe (CIP) wrote:
>> Dear Ray,
>>
>> The R's Spearman calculated by R is correct for ties or nonties, 
>> which is not correct is the probability for the case of ties. I send 
>> to you formulates it for the correlation with ties, that is equal to R.
>> Regards,
>>
>> Felipe de Mendiburu
>> Statistician
>
> Just use midranks for ties (as with rank()) and compute the ordinary 
> correlation on those (see also the spearman2 and rcorr functions in 
> Hmisc package).  No need to use complex formulas.  And the t 
> approximation for p-values works pretty well.

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to