R/statpsych2.R
size.test.cor2.Rd
Computes the sample size required to test equality of two Pearson or partial correlation with desired power in a 2-group design. Set s = 0 for a Pearson correlation.
size.test.cor2(alpha, pow, cor1, cor2, s)
alpha level for hypothesis test
desired power
planning value of correlation
planning value of correlation
number of control variables
Returns the required sample size per group
size.test.cor2(.05, .8, .4, .2, 0)
#> Sample size per group
#> [1,] 325
# Should return:
# Sample size per group
# [1,] 325