ss.power.R2: Function to plan sample size so that the test of the squared...

View source: R/ss.power.R2.R

ss.power.R2R Documentation

Function to plan sample size so that the test of the squared multiple correlation coefficient is sufficiently powerful.

Description

Function for determining the necessary sample size for the test of the squared multiple correlation coefficient or for determining the statistical power given a specified sample size for the squared multiple correlation coefficient in models where the regressors are regarded as fixed.

Usage

ss.power.R2(Population.R2 = NULL, alpha.level = 0.05, desired.power = 0.85,
p, Specified.N = NULL, Cohen.f2 = NULL, Null.R2 = 0, 
Print.Progress = FALSE, ...)

Arguments

Population.R2

Population squared multiple correlation coefficient

alpha.level

Type I error rate

desired.power

desired degree of statistical power

p

the number of predictor variables

Specified.N

the sample size used to calculate power (rather than determine necessary sample size)

Cohen.f2

Cohen's (1988) effect size for multiple regression: Population.R2/(1-Population.R2)

Null.R2

value of the null hypothesis that the squared multiple correlation will be evaluated against (this will typically be zero)

Print.Progress

if the progress of the iterative procedure is printed to the screen as the iterations are occuring

...

possible additional parameters for internal functions

Details

Determine the necessary sample size given a particular Population.R2, alpha.level, p, and desired.power. Alternatively, given Population.R2, alpha.level, p, and Specified.N, the function can be used to determine the statistical power.

Value

Sample.Size

returns either Necessary.Sample.Size or Specified.Sample.Size, depending on if sample size is being determined for a desired degree of statistical power analysis or if statistical power is being determined given a specified sample size, respectively

Actual.Power

Actual power of the situation described

Note

When determining sample size for a desired degree of power, there will always be a slightly larger degree of actual power. This is the case because the algorithm employed determines sample size until the actual power is no less than the desired power (given sample size is a whole number power will almost certainly not be exactly the specified value). This is the same as other statistical power procedures that return whole numbers for necessary sample size.

Author(s)

Ken Kelley (University of Notre Dame; KKelley@ND.Edu)

See Also

ss.aipe.R2, ss.power.reg.coef, conf.limits.ncf

Examples

# ss.power.R2(Population.R2=.5, alpha.level=.05, desired.power=.85, p=5)
# ss.power.R2(Cohen.f2=1, alpha.level=.05, desired.power=.85, p=5)
# ss.power.R2(Population.R2=.5, Specified.N=15, alpha.level=.05, 
# desired.power=.85, p=5)
# ss.power.R2(Cohen.f2=1, Specified.N=15, alpha.level=.05, desired.power=.85, p=5)

MBESS documentation built on Oct. 26, 2023, 9:07 a.m.