Professional Documents
Culture Documents
Calculate Sample Size and Power Using Stata
Calculate Sample Size and Power Using Stata
Command syntax:
sampsi proportion-H0 proportion-H1 , alpha(a) power(p) onesample
Example:
Result:
Assumptions:
n = 259
1
2. For a single measurement (a mean) in one sample
Command syntax:
sampsi mean-H0 mean-H1 , sd(x) alpha(a) power(p) onesample
Example:
Result:
Assumptions:
n = 95
2
B. Power of a Comparison For Given Sample Sizes and Alpha
Command:
sampsi proportion-1 proportion-2, n1(x) n2(y) alpha(a)
Example:
Result:
Estimated power:
power = 0.9301
3
2. For two means:
Command:
sampsi mean-1 mean-2, sd1(s) sd2(t) n1(x) n2(y) alpha(a)
Example:
Result:
Estimated power:
power = 0.5769