# Re: [R] Spearman's Rho Help!

From: Frank E Harrell Jr <f.harrell_at_vanderbilt.edu>
Date: Mon 24 Oct 2005 - 23:49:36 EST

Suresh Kumar Karanam wrote:
> Hi,
> I have a dataset with four categories of data, the number of samples are not
> the same in each category. I want to find the Spearaman's Rho. Let me give
> an example.
> x=(14.22770439,26.49420624,46.7277932,19.02550707,23.37379361,16.97789862,19.77100085,23.11270162,13.72929843,33.54430621,14.4756979,70.15811106,11.22789833,NA,NA,NA)
> y=(143.2420241,45.24260203,62.13218994,27.79050219,27.41029595,191.2759927,141.1430225,234.1600259,37.69120463,156.332942,19.98579421,34.77930022,69.90888888,21.92539608,NA,NA)
> z=(70.28027834,349.7838817,29.81811184,83.48042267,52.47989761,107.7110162,71.24609317,155.6580091,68.37158664,156.3179887,134.8930305,80.25242044,100.5309559,266.4470408,65.4934171,22.86950128)
> v=(150.2099947,73.52000706,83.18122348,150.3240468,352.9101222,195.8919089,263.9489287,114.2090369,153.5000165,18.62309563,117.2399949,441.8981252,285.3369951,161.3959985,NA,NA)
>
> I want to find the spearman's rho for this data. To my knowledge spearman's
> rho is for x vs. y or x vs. z or any combination. Is there a spearman's rho
> Thanks a bunch.
> suresh
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
>

In the Hmisc package see rcorr

```--
Frank E Harrell Jr   Professor and Chair           School of Medicine
Department of Biostatistics   Vanderbilt University

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help