size.ci.cor | R Documentation |
Computes the sample size required to estimate a population Pearson or partial correlation with desired confidence interval precision. Set s = 0 for a Pearson correlation. Set the correlation planning value to the smallest absolute value within a plausible range for a conservatively large sample size.
size.ci.cor(alpha, cor, s, w)
alpha |
alpha level for 1-alpha confidence |
cor |
planning value of correlation |
s |
number of control variables |
w |
desired confidence interval width |
Returns the required sample size
Bonett2000statpsych
size.ci.cor(.05, .362, 0, .25)
# Should return:
# Sample size
# 188
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.