size.ci.rsqr {statpsych} | R Documentation |
Computes the sample size required to estimate a 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. This function uses an approximation to the standard error of the squared multiple correlation.
size.ci.rsqr(alpha, r2, s, w)
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 |
Returns the required sample size
size.ci.rsqr(.05, .333, 2, .2) # Should return: # Sample size # [1,] 232