[R] test to compare significant correlation increase

Jonathan Baron baron at psych.upenn.edu
Wed May 30 19:35:08 CEST 2007


In response to the original message, see
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/85753.html

which describes two papers about comparing "dependent correlations",
which I think is a relevant question.  (Try Google too.  I didn't.)

There is also a paper by Steiger in Psychological Bulletin, 1980,
which I implemented in the following R code.  (Not tested since I
translated it from a BASIC script written in 1981.)

r12 <- as.numeric(readline("Difference r12 and r13, given r23. Input r12: "))
r13 <- as.numeric(readline("r13: "))
r23 <- as.numeric(readline("r23: "))
N <- as.numeric(readline("Number of Ss: "))
rd <- 1-r12*r12-r13*r13-r23*r23+2*r12*r13*r23
t2 <- (r12-r13)*sqrt((N-1)*(1+r23)/(2*rd*(N-1)/(N-3)+((r12+r13)/2)^2*(1-r23)^3))
print(paste("t(",N-3,")=",t2," p=",pt(t2,N-3)," one tailed",sep=""))
print("Steiger, J.H. (1980). Tests for comparing elements of a")
print("correlation matrix.  Psychological Bulletin, 87, 245-251.")

> On 30-May-07, at 11:24 AM, David Riano wrote:
> 
> > Hi!
> > I am calculating correlation between two variables:
> > 1. X versus Y
> > 2. X versus Y(with a 3 steps lag)
> >
> > I would like to test if the correlation
> > increase/decrease from 1 to 2 is significant or not.
> >
> > Is there any function in R to do this? any hints?
> >
> > Thanks for help :)
> >
> > David Ria�o
> > Center for Spatial Technologies and Remote Sensing (CSTARS)
> > University of California
> > 250-N, The Barn
> > One Shields Avenue
> > Davis, CA 95616-8527
> > USA
> > 1-(517) 629-5499
> > http://www.cstars.ucdavis.edu/~driano/index.html
> > http://www.cstars.ucdavis.edu
> >
> > ______________________________________________
> > R-help at stat.math.ethz.ch 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.
> 
> --
> Mike Lawrence
> Graduate Student, Department of Psychology, Dalhousie University
> 
> Website: http://myweb.dal.ca/mc973993
> Public calendar: http://icalx.com/public/informavore/Public
> 
> "The road to wisdom? Well, it's plain and simple to express:
> Err and err and err again, but less and less and less."
> 	- Piet Hein
> 
> ______________________________________________
> R-help at stat.math.ethz.ch 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.

-- 
Jonathan Baron, Professor of Psychology, University of Pennsylvania
Home page: http://www.sas.upenn.edu/~baron



More information about the R-help mailing list