size.test.lc.mean.bs {statpsych}R Documentation

Sample size for a test of a between-subjects mean linear contrast

Description

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

Usage

size.test.lc.mean.bs(alpha, pow, var, es, v)

Arguments

alpha

alpha level for hypothesis test

pow

desired power

var

planning value of average within-group variance

es

planning value of linear contrast of means

v

vector of between-subjects contrast coefficients

Value

Returns the required sample size for each group

Examples

v <- c(1, -1, -1, 1)
size.test.lc.mean.bs(.05, .90, 27.5, 5, v)

# Should return:
# Sample size per group
#                    47
 


[Package statpsych version 1.5.0 Index]