Learn R Programming

MBESS (version 4.1.0)

ci.sc: Confidence Interval for a Standardized Contrast in a Fixed Effects ANOVA

Description

Function to obtain the confidence interval for a standardized contrast in a fixed effects analysis of variance context.

Usage

ci.sc(means = NULL, s.anova = NULL, c.weights = NULL, n = NULL, N = NULL, Psi = NULL, ncp = NULL, conf.level = 0.95, alpha.lower = NULL, alpha.upper = NULL, df.error = NULL, ...)

Arguments

means
a vector of the group means or the means of the particular level of the effect (for fixed effect designs)
s.anova
the standard deviation of the errors from the ANOVA model (i.e., the square root of the mean square error)
c.weights
the contrast weights (chose weights so that the positive c-weights sum to 1 and the negative c-weights sum to -1; i.e., use fractional values not integers).
n
sample sizes per group or sample sizes for the level of the particular factor (if length 1 it is assumed that the sample size per group or for the level of the particular factor are are equal)
N
total sample size
Psi
the (unstandardized) contrast effect, obtained by multiplying the jth mean by the jth contrast weight (this is the unstandardized effect)
ncp
the noncentrality parameter from the t-distribution
conf.level
desired level of confidence for the computed interval (i.e., 1 - the Type I error rate)
alpha.lower
the Type I error rate for the lower confidence interval limit
alpha.upper
the Type I error rate for the upper confidence interval limit
df.error
the degrees of freedom for the error. In one-way designs, this is simply N-length (means) and need not be specified; it must be specified if the design has multiple factors.
...
optional additional specifications for nested functions

Value

References

Kelley, K. (2007). Constructing confidence intervals for standardized effect sizes: Theory, application, and implementation. Journal of Statistical Software, 20 (8), 1--24.

Lai, K., & Kelley, K. (2007). Sample size planning for standardized ANCOVA and ANOVA contrasts: Obtaining narrow confidence intervals. Manuscript submitted for publication.

Steiger, J. H. (2004). Beyond the F Test: Effect size confidence intervals and tests of close fit in the Analysis of Variance and Contrast Analysis. Psychological Methods, 9, 164--182.

See Also

conf.limits.nct, ci.src, ci.smd, ci.smd.c, ci.sm, ci.c

Examples

Run this code
# Here is a four group example. Suppose that the means of groups 1--4 are 2, 4, 9, 
# and 13, respectively. Further, let the error variance be .64 and thus the standard
# deviation would be .80 (note we use the standard deviation in the function, not the 
# variance). The standardized contrast of interest here is the average of groups 1 and 4
# versus the average of groups 2 and 3. 

ci.sc(means=c(2, 4, 9, 13), s.anova=.80, c.weights=c(.5, -.5, -.5, .5), 
n=c(3, 3, 3, 3), N=12, conf.level=.95)


# Here is an example with two groups. 
ci.sc(means=c(1.6, 0), s.anova=.80, c.weights=c(1, -1), n=c(10, 10), N=20, conf.level=.95)

Run the code above in your browser using DataLab