This function computes how many participants you need if you want to achieve a confidence interval of a given width. This is useful when you do a study and you are interested in how strongly two variables are associated.
pwr.confIntR(r, w = 0.1, conf.level = 0.95)
- The correlation you expect to find (confidence intervals for a given level of confidence get narrower as the correlation coefficient increases).
- The required half-width (or margin of error) of the confidence interval.
- The level of confidence.
The required sample size, or a vector or matrix of sample sizes if multiple correlation coefficients or required (half-)widths were supplied. The row and column names specify the
w values to which the sample size in each cell corresponds. The confidence level is set as attribute to the resulting vector or matrix.
Bonett, D. G., Wright, T. A. (2000). Sample size requirements for estimating Pearson, Kendall and Spearman correlations. Psychometrika, 65, 23-28.
Bonett, D. G. (2014). CIcorr.R and sizeCIcorr.R http://people.ucsc.edu/~dgbonett/psyc181.html
Moinester, M., & Gottfried, R. (2014). Sample size estimation for correlations with pre-specified confidence interval. The Quantitative Methods of Psychology, 10(2), 124-130. http://www.tqmp.org/RegularArticles/vol10-2/p124/p124.pdf
Peters, G. J. Y. & Crutzen, R. (forthcoming) An easy and foolproof method for establishing how effective an intervention or behavior change method is: required sample size for accurate parameter estimation in health psychology.
pwr.confIntR(c(.4, .6, .8), w=c(.1, .2));