Learn R Programming

statpsych (version 2.0.0)

size.ci.rsqr: Sample size for a squared multiple correlation confidence interval

Description

Computes the sample size required to estimate a population squared multiple correlation in a random-x regression model with desired confidence interval precision. Set the planning value of the squared multiple correlation to 1/3 for a conservatively large sample size.

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

Usage

size.ci.rsqr(alpha, r2, s, w)

Value

Returns the required sample size

Arguments

alpha

alpha level for 1-alpha confidence

r2

planning value of squared multiple correlation

s

number of predictor variables in model

w

desired confidence interval width

References

Bonett2021statpsych

Examples

Run this code
size.ci.rsqr(.05, .3, 5, .2)

# Should return:
# Sample size
#         227
 

Run the code above in your browser using DataLab