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.

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

Examples

size.ci.cor(.05, .362, 0, .25)

# Should return:
# Sample size
#         188
 


statpsych documentation built on Sept. 11, 2024, 7:42 p.m.