Learn R Programming

samplesize (version 0.1-7)

n.welch.test: Sample size for Student's t-test with Welch approximation

Description

Function computes sample size for Student's t-test with Welch approximation for unequal variances

Usage

n.welch.test(power = 0.8, alpha = 0.95, mean.diff = 2, sd.est1 = 1, sd.est2 = 2.65)

Arguments

power
required power 1-beta
alpha
required Level I-error 1-alpha
mean.diff
required minimum difference between group means
sd.est1
standard deviation in group 1
sd.est2
standard deviation in group 2

Value

  • sample sizeTotal sample size N
  • sample size n1sample size in group 1
  • sample size n2sample size in group 2

References

Bock J., Bestimmung des Stichprobenumfangs fuer biologische Experimente und kontrollierte klinische Studien. Oldenbourg 1998

See Also

n.indep.t.test.neq(), n.paired.t.test(), n.indep.t.test.eq()

Examples

Run this code
n.welch.test(power = 0.8, alpha = 0.95, mean.diff = 2, sd.est1 = 1, sd.est2 = 2.65)

Run the code above in your browser using DataLab