paired.r {psych}R Documentation

Test the difference between paired correlations

Description

Test the difference between paired correlations. Given 3 variables, x, y, z, is the correlation between xy different than that between xz? If y and z are independent, this is a simple t-test. But, if they are dependent, it is a bit more complicated.

Usage

paired.r(xy, xz, yz, n)

Arguments

xy r(xy)
xz r(xz)
yz r(yz)
n Number of subjects

Details

Find a t2 statistic for the difference of two dependent correlations.

Value

t2

Author(s)

William Revelle
Northwestern University
Evanston, Illinois
revelle@northwestern.edu
http://personality-project.org/revelle.html

References

Examples

##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--    or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function(xy,xz,yz,n) {
       diff <- xy-xz
       determin=1-xy*xy - xz*xz - yz*yz + 2*xy*xz*yz
       av=(xy+xz)/2
       cube= (1-yz)*(1-yz)*(1-yz)
       t2 = diff * sqrt((n-1)*(1+yz)/(((2*(n-1)/(n-3))*determin+av*av*cube)))
       return(t2)
        }

[Package psych version 1.0-18 Index]