Learn R Programming

statpsych (version 1.7.0)

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

Description

Computes the sample size per group required to estimate two types of population standardized mean differences (unweighted standardizer and single group standardizer) with desired confidence interval precision in a 2-group design. Set the standardized mean difference planning value to the largest value within a plausible range for a conservatively large sample size. Set R = 1 for equal sample sizes.

Usage

size.ci.stdmean2(alpha, d, w, R)

Value

Returns the required sample size per group for each standardizer

Arguments

alpha

alpha level for 1-alpha confidence

d

planning value of standardized mean difference

w

desired confidence interval width

R

n2/n1 ratio

References

Bonett2009statpsych

Examples

Run this code
size.ci.stdmean2(.05, .75, .5, 1)

# Should return:
#                              n1  n2
# Unweighted standardizer:    132 132
# Single group standardizer:  141 141

size.ci.stdmean2(.05, .75, .5, 2)

# Should return:
#                              n1  n2
# Unweighted standardizer:     99 198
# Single group standardizer:  106 212
 

Run the code above in your browser using DataLab