size.ci.lc.mean.bs: Sample size for a between-subjects mean linear contrast...

View source: R/statpsych1.R

size.ci.lc.mean.bsR Documentation

Sample size for a between-subjects mean linear contrast confidence interval

Description

Computes the sample size in each group (assuming equal sample sizes) required to estimate a linear contrast of population means with desired confidence interval precision in a between-subjects design. Set the variance planning value to the largest value within a plausible range for a conservatively large sample size.

For more details, see Section 3.24 of Bonett (2021, Volume 1)

Usage

size.ci.lc.mean.bs(alpha, var, w, v)

Arguments

alpha

alpha level for 1-alpha confidence

var

planning value of average within-group variance

w

desired confidence interval width

v

vector of between-subjects contrast coefficients

Value

Returns the required sample size for each group

References

\insertRef

Bonett2021statpsych

Examples

v <- c(.5, .5, -.5, -.5)
size.ci.lc.mean.bs(.05, 8.0, 3.0, v)

# Should return:
# Sample size per group
#                    15
 


statpsych documentation built on Jan. 13, 2026, 1:07 a.m.