[R] p-value in Spearman rank order

Liviu Andronic landronimirc at gmail.com
Thu Feb 28 23:19:57 CET 2008


On 2/28/08, Anne-Katrin Link <anne.link at gmx.de> wrote:
>  I would like to do a Spearman rank order test, and used the cor() function
>  with the method "spearman".
>  It gives me a number (correlation coefficient?) , but how can I get the
>  p-value?

You're probably looking for rcorr() from Hmisc. It gives the
correlation, missing values and p-values. Check [1] and [2] for
examples and several explanations. There is also a nice plot [3].

Hope this is of help,
Liviu

[1] http://oit.utk.edu/scc/RforSAS&SPSSusers.pdf
[2] http://www.statmethods.net/stats/correlations.html
[3] http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=137



More information about the R-help mailing list