# Re: [R] test to compare significant correlation increase

From: Jonathan Baron <baron_at_psych.upenn.edu>
Date: Wed, 30 May 2007 13:35:08 -0400

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: "))
```

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
> > 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
> and provide commented, minimal, self-contained, reproducible code.

```--
Jonathan Baron, Professor of Psychology, University of Pennsylvania

______________________________________________
R-help_at_stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
and provide commented, minimal, self-contained, reproducible code.
```
Received on Wed 30 May 2007 - 17:25:23 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 Wed 30 May 2007 - 17:31:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.