Skip to content

Pearson's correlation coefficient?

4 messages · Matej Cepl, Andrew C. Ward, Brian Ripley

#
How do I get non-squared correlation coefficient in some more
sensible way than

	sqrt(summary(lm(y~x))$r.squared)?

Thanks

	Matej
#
Matej, try the following
   > cor.test(x,y)$estimate

Regards,

Andrew C. Ward

CAPE Centre
Department of Chemical Engineering
The University of Queensland
Brisbane Qld 4072 Australia
andreww at cheque.uq.edu.au


Quoting Matej Cepl <matej at ceplovi.cz>:
.-.-.-.-.-.-
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._._._._
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Thu, 21 Nov 2002, Andrew C. Ward wrote:

            
or just cor(x, y).
That's lost the sign, BTW.
#
ripley at stats.ox.ac.uk wrote:
Thanks, that's it.
You are right, of course.

Matej