Re: [R] correlation

From: Peter Dalgaard <>
Date: Fri, 08 Feb 2008 17:37:42 +0100 wrote:
> Dear list
> I would like to compare two measurements of disease severity (M1 and
> M2), one of the is continuous (M1 ranging from 1 to 10) and the other
> is ordinal (M2 takes Low, Medium, high and very high). Do you think is
> ok to use cor() function to test whether the two agree, i.e correlate?
> I am afraid that if I set M2 to 1,2,3 and 4, the function cor() will
> take them as continuous and therefore lose intrepretation.
> Thanks for your commments
It's probably not massively wrong, given that the interpretation of correlation coefficients is usually not very clear anyway (excepting maybe nearly-perfect correlated cases). However, a Spearman correlation does have the rather nice feature of being independent of the values you assign to M2, and of any monotone transformation of M1 too.

   O__  ---- Peter Dalgaard             ุster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (                  FAX: (+45) 35327907

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Fri 08 Feb 2008 - 16:39:52 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 08 Feb 2008 - 17:30:13 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive