Description Usage Arguments Details References
View source: R/correlation_measures.R
prec_cor returns the sample size or the precision for the given
pearson, spearman, or kendall correlation coefficient
1 2 3 |
r |
Desired correlation coefficient. |
conf.width |
precision (the full width of the conficende interval) |
conf.level |
confidence level |
method |
Exactly one of |
tol |
numerical tolerance used in root finding, the default providing (at least) four significant digits |
Exactly one of the parameters n, conf.width must be passed as NULL,
and that parameter is determined from the other.
Sample size or precision is calculated according to formula 2 in Bonett and Wright (2000). The use of pearson is only recommended, if n ≥ 25. The pearson correlation coefficient assumes bivariate normality. If the assumption of bivariate normality cannot be met, spearman or kendall should be considered.
n is rounded up to the next whole number using ceiling.
uniroot is used to solve n.
Bonett DG, and Wright TA (2000) Sample size requirements for estimating Pearson, Kendall and Spearman correlations Psychometrika 65:23-28. doi:10.1007/BF02294183
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.