Learn R Programming

statpsych (version 1.7.0)

size.ci.lc.mean.bs: 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.

Usage

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

Value

Returns the required sample size for each group

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

Examples

Run this code
v <- c(.5, .5, -1)
size.ci.lc.mean.bs(.05, 5.62, 2.0, v)

# Should return:
# Sample size per group
#                    34
 

Run the code above in your browser using DataLab