R/statpsych2.R
size.ci.rsqr.Rd
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.
size.ci.rsqr(alpha, r2, s, w)
alpha level for 1-alpha confidence
planning value of squared multiple correlation
number of predictor variables in model
desired confidence interval width
Returns the required sample size
size.ci.rsqr(.05, .25, 5, .2)
#> Sample size
#> 214
# Should return:
# Sample size
# 214