size.test.cor | R Documentation |
Computes the sample size required to test a population Pearson or a partial correlation with desired power. Set s = 0 for a Pearson correlation.
size.test.cor(alpha, pow, cor, s, h)
alpha |
alpha level for hypothesis test |
pow |
desired power |
cor |
planning value of correlation |
s |
number of control variables |
h |
null hypothesis value of correlation |
Returns the required sample size
size.test.cor(.05, .9, .45, 0, 0)
# Should return:
# Sample size
# 48
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.