size.ci.mean2: Sample size for a 2-group mean difference confidence interval

View source: R/statpsych1.R

size.ci.mean2R Documentation

Sample size for a 2-group mean difference confidence interval

Description

Computes the sample size for each group required to estimate a population mean difference with desired confidence interval precision in a 2-group design. Set R = 1 for equal sample sizes. Set the variance planning value to the largest value within a plausible range for a conservatively large sample size.

Usage

size.ci.mean2(alpha, var, w, R)

Arguments

alpha

alpha level for 1-alpha confidence

var

planning value of average within-group variance

w

desired confidence interval width

R

n2/n1 ratio

Value

Returns the required sample size for each group

Examples

size.ci.mean2(.05, 37.1, 5, 1)

# Should return:
#      n1  n2
# [1,] 47  47
 


statpsych documentation built on July 9, 2023, 6:50 p.m.