Compare two nonoverlapping correlations based on dependent groups
Compare two nonoverlapping correlations based on dependent groups
Performs a test of significance for the difference between two correlations based on dependent groups (e.g., the same group). The two correlations are nonoverlapping, i.e., they have no variable in common. The function tests whether the correlations between j and k (r.jk) and between h and m (r.hm) differ in magnitude. Because the significance depends on the pairwise intercorrelations between all of the variables involved (j, k, h, and m), these intercorrelations have to be provided as additional parameters. The function expects correlation coefficients as input.
cocor.dep.groups.nonoverlap( r.jk, r.hm, r.jh, r.jm, r.kh, r.km, n, alternative ="two.sided", test ="all", alpha =0.05, conf.level =0.95, null.value =0, data.name =NULL, var.labels =NULL, return.htest =FALSE)
Arguments
r.jk: A number specifying the correlation between j and k (this correlation is used for comparison)
r.hm: A number specifying the correlation between h and m (this correlation is used for comparison)
r.jh: A number specifying the correlation between j and h
r.jm: A number specifying the correlation between j and m
r.kh: A number specifying the correlation between k and h
r.km: A number specifying the correlation between k and m
n: An integer defining the size of the group
alternative: A character string specifying whether the alternative hypothesis is two-sided ("two.sided"; default) or one-sided ("greater" or "less", depending on the direction). Optionally, the initial letter of the character strings ("t", "g", and "l)" can be used.
test: A vector of character strings specifying the tests to be used (pearson1898, dunn1969, steiger1980, raghunathan1996, silver2004, or zou2007). Use all to apply all tests (default). For further information see the tests section below.
alpha: A number defining the alpha level for the hypothesis test. The default value is .05.
conf.level: A number defining the level of confidence for the confidence interval (if test zou2007 is used). The default value is .95.
null.value: A number defining the hypothesized difference between the two correlations used for testing the null hypothesis. The default value is 0. If the value is other than 0, only the test zou2007 that uses a confidence interval is available.
data.name: A character string giving the name of the data/group.
var.labels: A vector of four character strings specifying the labels for j, k, h, and m (in this order).
return.htest: A logical indicating whether the result should be returned as a list containing a list of class 'htest' for each test. The default value is FALSE.
Returns
Returns an S4 object of class 'cocor.dep.groups.nonoverlap' with the following slots: - r.jk: Input parameter
r.hm: Input parameter
r.jh: Input parameter
r.jm: Input parameter
r.kh: Input parameter
r.km: Input parameter
n: Input parameter
alternative: Input parameter
alpha: Input parameter
conf.level: Input parameter
null.value: Input parameter
data.name: Input parameter
var.labels: Input parameter
diff: Difference between the two correlations, r.jk and r.hm, that were compared
For each test a slot of the same name exists with a list containing the following elements: - statistic: The value of the test statistic (unless test zou2007 is used).
distribution: The distribution of the test statistic (unless test zou2007 is used).
p.value: The p-value of the test (unless test zou2007 is used).
conf.int: The confidence interval of the difference between the two correlations (if test zou2007 is used).
Tests
In the following, rjk and rhm are the two correlations that are being compared; Zjk and Zhm are their Z transformed equivalents. rjh, rkh, rjm, and rkm are the related correlations that are also required. n specifies the size of the group the two correlations are based on. Some tests make use of Fisher's r-to-Z transformation (1921, p. 26):
Z=21(ln(1+r)−ln(1−r)).Z=(1/2)(ln(1+r)−ln(1−r)).
pearson1898:: Pearson and Filon's (1898) z
This test was proposed by Pearson and Filon (1898, p. 262, formula xl). The formula for the test statistic $z$ is computed as
steiger1980:: Steiger's (1980) modification of Dunn and Clark's (1969) z using average correlations
This test was proposed by Steiger (1980) and is a modification of Dunn and Clark's (1969) $z$. Instead of $r_{jk}$ and $r_{hm}$ the mean of the two is being used. The test statistic $z$ is given by
(Steiger, 1980, p. 247, formula 11; in the original article, there are brackets missing around the divisor).
raghunathan1996:: Raghunathan, Rosenthal, and Rubin's (1996) modification of Pearson and Filon's (1898) z
This test of Raghunathan, Rosenthal, and Rubin (1996) is based on Pearson and Filon's (1898) $z$. Unlike Pearson and Filon (1898), Raghunathan et al. (1996) use $Z$ transformed correlation coefficients. The test statistic $z$ is computed as
silver2004:: Silver, Hittner, and May's (2004) modification of Dunn and Clark's (1969) z using a backtransformed average Fisher's (1921) Z procedure
The approach to backtransform averaged Fisher's (1921) $Z$s was first proposed in Silver and Dunlap (1987) and was applied to the comparison of nonoverlapping correlations by Silver et al. (2004). The test is based on Steiger's (1980) approach. The formula of the test statistic $z$ is given by
This test calculates the confidence interval of the difference between the two correlations $r_{jk}$ and $r_{hm}$. If the confidence interval includes zero, the null hypothesis that the two correlations are equal must be retained. If the confidence interval does not include zero, the null hypothesis has to be rejected. A lower and upper bound for the interval ($L$ and $U$, respectively) is given by
(Zou, 2007, p. 406). $\alpha$ denotes the desired alpha level of the confidence interval.
Examples
# Compare the difference between the correlations (age, intelligence) and# body mass (index, shoe size) measured in the same group (all values are fictional):r.jk <-.2# Correlation (age, intelligence)r.hm <-.7# Correlation (body mass index, shoe size)r.jh <-.4# Correlation (age, body mass index)r.jm <-.5# Correlation (age, shoe size)r.kh <-.1# Correlation (intelligence, body mass index)r.km <-.3# Correlation (intelligence, shoe size)n <-232# Size of the groupcocor.dep.groups.nonoverlap(r.jk, r.hm, r.jh, r.jm, r.kh, r.km, n,var.labels=c("age","intelligence","body mass index","shoe size"))
References
Dunn, O. J., & Clark, V. A. (1969). Correlation coefficients measured on the same individuals. Journal of the American Statistical Association, 64, 366-377. doi:10.2307/2283746
Pearson, K., & Filon, L. N. G. (1898). Mathematical contributions to theory of evolution: IV. On the probable errors of frequency constants and on the influence of random selection and correlation. Philosophical Transactions of the Royal Society of London, Series A, 191, 229-311. doi:10.1098/rsta.1898.0007
Raghunathan, T. E., Rosenthal, R., & Rubin, D. B., (1996). Comparing correlated but nonoverlapping correlations. Psychological Methods, 1, 178-183. doi:10.1037//1082-989X.1.2.178
Silver, N. C., & Dunlap, W. P. (1987). Averaging correlation coefficients: Should Fisher's Z transformation be used? Journal of Applied Psychology, 72, 146-148. doi:10.1037//0021-9010.72.1.146
Silver, N. C., Hittner, J. B., & May, K. (2004). Testing dependent correlations with nonoverlapping variables: A Monte Carlo simulation. Journal of Experimental Education, 73, 53-69. doi:10.3200/JEXE.71.1.53-70
Steiger, J. H. (1980). Tests for comparing elements of a correlation matrix. Psychological Bulletin, 87, 245-251. doi:10.1037//0033-2909.87.2.245
Zou, G. Y. (2007). Toward using confidence intervals to compare correlations. Psychological Methods, 12, 399-413. doi:10.1037/1082-989X.12.4.399