size.test.cor2 | R Documentation |
Computes the sample size required to test the equality of two population Pearson or partial correlations with desired power in a 2-group design. Set s = 0 for a Pearson correlation.
size.test.cor2(alpha, pow, cor1, cor2, s)
alpha |
alpha level for hypothesis test |
pow |
desired power |
cor1 |
planning value of correlation for group 1 |
cor2 |
planning value of correlation for group 2 |
s |
number of control variables |
Returns the required sample size for each group
size.test.cor2(.05, .8, .4, .2, 0)
# Should return:
# Sample size per group
# 325
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.