Learn R Programming

diffcor (version 0.7.1)

diffcor: Fisher's z-Tests Concerning Difference of Correlations

Description

Computations of Fisher's z-tests concerning differences between correlations.

diffcor.one() can be used to test if an observed correlation differs from an expected one, for example, in construct validation. diffcor.two() can be used to test if the correlation between two variables differs across two independent studies. diffcor.dep() can be applied to check if the correlation between two variables (r12) differs from the correlation between the first and a third one (r13), given the intercorrelation of the compared constructs (r23). All outputs provide the compared correlations, test statistic as z-score, and p-values. For diffcor.one() and diffcor.two(), the output further provides 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.

Usage

diffcor.one(emp.r, hypo.r, n, alpha = .05, cor.names = NULL,
alternative = c("one.sided", "two.sided"), digit = 3)

diffcor.two(r1, r2, n1, n2, alpha = .05, cor.names = NULL, alternative = c("one.sided", "two.sided"), digit = 3)

diffcor.dep(r12, r13, r23, n, cor.names = NULL, alternative = c("one.sided", "two.sided"), digit = 3)

Value

r_exp

Vector of the expected correlations in diffcor.one

r_obs

Vector of the empirically observed correlations in diffcor.one

r1

Vector of the empirically observed correlations in the first sample

r2

Vector of the empirically observed correlations in the second sample

r12

Vector of the empirically observed correlations between the first and the second construct in diffcor.dep

r13

Vector of the empirically observed correlations between the first and the third construct in diffcor.dep

r23

Vector of the empirically observed correlations between the second and the third construct in diffcor.dep

LL

Lower limit of the confidence interval of the empirical correlation in diffcor.one, given the specified alpha level, DEFAULT = 95 percent

UL

Upper limit of the confidence interval of the empirical correlation in diffcor.one, given the specified alpha level, DEFAULT = 95 percent

LL1

Lower limit of the confidence interval of the first empirical correlation in diffcor.two, given the specified alpha level, DEFAULT = 95 percent

UL1

Upper limit of the confidence interval of the first empirical correlation in diffcor.two, given the specified alpha level, DEFAULT = 95 percent

LL2

Lower limit of the confidence interval of the second empirical correlation in diffcor.two, given the specified alpha level, DEFAULT = 95 percent

UL2

Upper limit of the confidence interval of the second empirical correlation in diffcor.two, given the specified alpha level, DEFAULT = 95 percent

z

Test statistic for correlation difference in units of z distribution

p

p value for one- or two-sided testing, depending on alternative = c("one.sided", "two.sided)

Cohen_q

Effect size measure for differences of independent correlations

Arguments

emp.r

Empirically observed correlation

hypo.r

Hypothesized correlation which shall be tested

n

Sample size in which the observed effect was found

alpha

Likelihood of Type I error, DEFAULT = .05

cor.names

Optional, label for the correlation (e.g., "IQ-performance"). Per default, cor.names is NULL

digit

Number of digits in the output for all parameters, DEFAULT = 3

alternative

A character string specifying if you wish to test one-sided or two-sided differences

r1

First correlation coefficient

r2

Second correlation coefficient

n1

Sample size in which the first correlation coeffient was observed

n2

Sample size in which the second correlation coeffient was observed

r12

Correlation between the first and the second construct

r13

Correlation between the first and the third construct

r23

Correlation between the second and the third construct

Author

Christian Blötner c.bloetner@gmail.com

References

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.

Examples

Run this code
diffcor.one(c(.76, .53, -.32), c(.70, .35, -.40),
  c(225, 250, 210),
  cor.names = c("a-b", "c-d", "e-f"), digit = 2, alternative = "one.sided")

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

diffcor.dep(r12 = .76, r13 = .70, r23 = .50, n = 271, digit = 4,
cor.names = NULL, alternative = "two.sided")

Run the code above in your browser using DataLab