Tests whether the correlation between two variables differs across two independent studies/samples. The correlations are automatically transformed with the Fisher z-transformation prior to computations. The output provides the compared correlations, test statistic as z-score, p-values, confidence intervals of the empirical correlations, and the effect size Cohens q. According to Cohen (1988), q = |.10|, |.30| and |.50| are considered small, moderate, and large differences, respectively.
diffcor.two(r1, r2, n1, n2, alpha = .05, cor.names = NULL,
alternative = c("one.sided", "two.sided"), digit = 3)
Vector of the empirically observed correlations in the first sample
Vector of the empirically observed correlations in the second sample
Lower limit of the confidence interval of the first empirical correlation, given the specified alpha level, DEFAULT = 95 percent
Upper limit of the confidence interval of the first empirical correlation, given the specified alpha level, DEFAULT = 95 percent
Lower limit of the confidence interval of the second empirical correlation, given the specified alpha level, DEFAULT = 95 percent
Upper limit of the confidence interval of the second empirical correlation, given the specified alpha level, DEFAULT = 95 percent
Test statistic for correlation difference in units of z distribution
p value for one- or two-sided testing, depending on alternative = c("one.sided", "two.sided)
Effect size measure for differences of independent correlations
Correlation coefficient in first sample
Correlation coefficient in second sample
First sample size
Second sample size
Likelihood of Type I error, DEFAULT = .05
OPTIONAL, label for the correlation (e.g., "IQ-performance"). DEFAULT is NULL
Number of digits in the output for all parameters, DEFAULT = 3
A character string specifying if you wish to test one-sided or two-sided differences
Christian Blötner c.bloetner@gmail.com
Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). Lawrence Erlbaum.
Eid, M., Gollwitzer, M., & Schmitt, M. (2015). Statistik und Forschungsmethoden (4.Auflage) [Statistics and research methods (4th ed.)]. Beltz.
Steiger, J. H. (1980). Tests for comparing elements of a correlation matrix. Psychological Bulletin, 87, 245-251.
diffcor.two(r1 = c(.39, .52, .22),
r2 = c(.29, .44, .12),
n1 = c(66, 66, 66), n2 = c(96, 96, 96), alpha = .01,
cor.names = c("a-b", "c-d", "e-f"), alternative = "one.sided")
Run the code above in your browser using DataLab