* For further details see http://jutze.com/research/2016-schult-sparfeldt-pirls-timss * MC vs CR project data analysis (compare nonindependent correlations) * written by Johannes Schult j.schult@mx.uni-saarland.de * last updated 2014-01-28 * two nonindependent correlations with a variable in common (cf. Weaver & Wuensch, 2013, p. 13) * a correlation matrix based on three variable should be run first, e.g. *corr deu_note thetamcmc thetamccr local n = r(N) matrix RRR = r(C) local r12 = RRR[1,2] local r13 = RRR[1,3] local r23 = RRR[2,3] local alpha = 0.05 preserve clear set obs 1 gen r12 = `r12' gen r13 = `r13' gen r23 = `r23' gen n = `n' gen alpha = `alpha' gen diff = r12 - r13 gen t = diff * sqrt((n-1)*(1+r23) / (2*((n-1)/(n-3))*((1 - r12^2 - r13^2 - r23^2) + 2*r12*r13*r23) + ((r12+r13)^2/4)*(1-r23)^3)) gen df = n-3 gen p = t(df,(0 - abs(t)))*2 * HERE'S THE COMPARISON OF CORRELATIONS list r12 r13 diff r23 t df p alpha n restore