ss.aipe.c: Sample size planning for an ANOVA contrast from the Accuracy...

View source: R/ss.aipe.c.R

ss.aipe.cR Documentation

Sample size planning for an ANOVA contrast from the Accuracy in Parameter Estimation (AIPE) perspective

Description

A function to calculate the appropriate sample size per group for the (unstandardized) ANOVA contrast so that the width of the confidence interval is sufficiently narrow.

Usage

ss.aipe.c(error.variance = NULL, c.weights, width, conf.level = 0.95, 
assurance = NULL, certainty = NULL, MSwithin = NULL, SD = NULL, ...)

Arguments

error.variance

the common error variance; i.e., the mean square error

c.weights

the contrast weights

width

the desired full width of the obtained confidence interval

conf.level

the desired confidence interval coverage, (i.e., 1 - Type I error rate)

assurance

parameter to ensure that the obtained confidence interval width is narrower than the desired width with a specified degree of certainty (must be NULL or between zero and unity)

certainty

an alias for assurance

MSwithin

an alias for error.variance

SD

the standard deviation of the common error in ANOVA model

...

allows one to potentially include parameter values for inner functions

Value

n

the necessary sample size per group

Note

Be sure to use the error varaince and not its square root (i.e., the standard deviation of the errors).

Author(s)

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

References

Kelley, K., Maxwell, S. E., & Rausch, J. R. (2003). Obtaining power or obtaining precesion: Delineating methods of sample size planning. Evaluation and the Health Professions, 26, 258–287.

Maxwell, S. E., & Delaney, H. D. (2004). Designing experiments and analyzing data: A model comparison perspective. Mahwah, NJ: Erlbaum.

See Also

ss.aipe.sc, ss.aipe.c.ancova, ci.c

Examples

# Suppose the population error variance of some three-group ANOVA model
# is believed to be 40. The researcher is interested in the difference 
# between the mean of group 1 and the average of means of group 2 and 3. 
# To plan the sample size so that, with 90 percent certainty, the 
# obtained 95 percent full confidence interval width is no wider than 3:

ss.aipe.c(error.variance=40, c.weights=c(1, -0.5, -0.5), width=3, assurance=.90)

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