cower is an R-package to conduct power analyses on the comparison of
correlation coefficients. Currently, power analyses for the comparisons
of independent correlations -- as tested via Fisher's z-test -- are
available. Results have been tested against G-Power 3.1.
Studies that compare independent correlation coefficients require very
large sample sizes to obtain reasonable power (e.g.: r = 0.5 versus
r = 0.4 requires 787 participants per group for a power of .80 in a
one-sided test). Therefore, it is often preferable to consider a
comparison of dependent correlations if that is feasible. However, this
is not always possible; it then crucial to know the power to detect a
hypothesized difference in independent correlations.
cower is used to
conduct such power analyses.
cower is not available from CRAN, you can install it directly from
this GitHub repository. To do so, you need the
devtools package. Then
run the following commands:
library("devtools") # if not available, run: install.packages("devtools") install_github("m-Py/cower") # load the package via library("cower")
To compute the number of participants needed to obtain a certain power,
we can use the function
power.indep.cor. We specify two hypothesized
population correlation coefficients and the desired power:
power.indep.cor(r1 = 0.4, r2 = 0.3, power = .8) $r1  0.4 $r2  0.3 $q  0.1141293 $n1  1209 $n2  1209 $power  0.8002746 $sig.level  0.05 $hypothesis  "two.sided"
By default, the power for a two-sided test is computed, and an alpha
level of .05 is adapted. The alpha-level can be changed using the
sig.level and the sidedness can be changed using the
alternative (for a one-sided test, set
"less" or "greater", depending on whether r1 is smaller or greater than
To determine the achieved power for the comparisons of two given
population correlation coefficients and sample size, we can use
power.indep.cor the following way. Here we do not specify the
power (which is to be computed), but instead specify two
power.indep.cor(r1 = 0.4, r2 = 0.3, n1 = 450, n2 = 350) $r1  0.4 $r2  0.3 $q  0.1141293 $n1  450 $n2  350 $power  0.3576306 $sig.level  0.05 $hypothesis  "two.sided"
Again, we could also adjust the alpha-level and the sidedness of the hypothesis test.
For more information, load the package and open the help page by running:
If you have any questions or suggestions (which are greatly appreciated), just open an issue at GitHub or contact me via email.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.