[R] Comparing the correlations coefficient of two (very) dependent samples

Mike Cheung mikewlcheung at gmail.com
Tue May 4 03:51:39 CEST 2010


Dear Tal,

There are several approaches in doing it (see Steiger, 2003). It
should not be difficult to implement them in R.

Steiger, J.H. (2003). Comparing correlations. In A. Maydeu-Olivares
(Ed.) Psychometrics. A festschrift to Roderick P. McDonald. Mahwah,
NJ:  Lawrence Erlbaum Associates.
http://www.statpower.net/Steiger%20Biblio/Steiger03.PDF

Regards,
Mike
--
---------------------------------------------------------------------
 Mike W.L. Cheung               Phone: (65) 6516-3702
 Department of Psychology       Fax:   (65) 6773-1843
 National University of Singapore
 http://courses.nus.edu.sg/course/psycwlm/internet/
---------------------------------------------------------------------

On Tue, May 4, 2010 at 2:00 AM, Tal Galili <tal.galili at gmail.com> wrote:
> Hello all,
>
> I believe this can be done using bootstrap, but I am wondering if there is
> some other way that might be used to tackle this.
>
> #Let's say I have two pairs of samples:
> set.seed(100)
> s1 <- rnorm(100)
> s2 <- s1 + rnorm(100)
>
> x1 <- s1[1:99]
> y1 <- s2[1:99]
>
> x2 <- x1
> y2 <- s2[2:100]
>
> #And both yield the following two correlations:
> cor(x1,y1) # 0.7568969  (cor1)
> cor(x2,y2) # -0.2055501 (cor2)
>
> Now for my questions:
> 1) is cor1 larger then cor2?   (CI for the diff ?)
> 2) With what P value?
> 3) What if the values of s1 are not independent ?
>
> I found an older thread discussing such issues:
> http://tolstoy.newcastle.edu.au/R/e2/help/06/09/1035.html
> But wasn't sure how much this might be relevant to my case.
>
>
>
> Thanks for any help,
> Tal
>
> ----------------Contact
> Details:-------------------------------------------------------
> Contact me: Tal.Galili at gmail.com |  972-52-7275845
> Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
> www.r-statistics.com (English)
> ----------------------------------------------------------------------------------------------
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list