size.ci.cor: Sample size for a Pearson or partial correlation confidence...

View source: R/statpsych2.R

size.ci.corR Documentation

Sample size for a Pearson or partial correlation confidence interval

Description

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.

For more details, see Section 1.24 of Bonett (2021, Volume 2)

Usage

size.ci.cor(alpha, cor, s, w)

Arguments

alpha

alpha level for 1-alpha confidence

cor

planning value of correlation

s

number of control variables

w

desired confidence interval width

Value

Returns the required sample size

References

\insertRef

Bonett2000statpsych

\insertRef

Bonett2021statpsych

Examples

size.ci.cor(.05, .3, 0, .2)

# Should return:
# Sample size
#         320
 


statpsych documentation built on Jan. 13, 2026, 1:07 a.m.