Learn R Programming

MBESS (version 4.1.0)

ss.aipe.c: 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

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

Run this code
# 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)

Run the code above in your browser using DataLab