or testing $\rho= \rho_0 $ or $\rho_1 =
\rho_2$.
The two statistics will not be equivalent at $\rho=0$ because the
statistics are based on different assumptions.
Jeremy Miles
Sent by: r-help-boun...@r-project.org
10/16/2014 07:32 PM
To
r-help ,
cc
Subject
[R] Difference betweeen cor.
This is pretty much standard. I'm quite sure that other stats packages do
likewise and I wouldn't know who "everyone" is. It is not unheard of that
textbook authors give suboptimal formulas in order not to confuse students,
though.
The basic point is that the t transformation gives the exact di
Hi Jeremy,
I don't know about references, but this around. See for example:
http://afni.nimh.nih.gov/sscc/gangc/tr.html
the relevant line in cor.test is:
STATISTIC <- c(t = sqrt(df) * r/sqrt(1 - r^2))
You can convert *t*s to *r*s and vice versa.
Best,
Josh
On Fri, Oct 17, 2014 at 10:32 AM
I'm trying to understand how cor.test() is calculating the p-value of
a correlation. It gives a p-value based on t, but every text I've ever
seen gives the calculation based on z.
For example:
> data(cars)
> with(cars[1:10, ], cor.test(speed, dist))
Pearson's product-moment correlation
data: sp
4 matches
Mail list logo