128 Equivalence and Noninferiority Tests
sigma = prior estimate of the standard deviation
n = sample size
SAS code:
libname stuff 'H:\Personal Data\Equivalence & Noninferiority\
Programs & Output';
data calc;
set stuff.d20120801_one_mean;
delta = (muA - muL)/sigma;
nc = sqrt(n) * delta;
tcrit = tinv(0.05,n-1);
power = 1 - probt(tcrit,n-1,nc);/* Pr{T' > = tcrit} */
run;
proc print data = calc;/*dataset calc has columns n muL muA
sigma delta nc power */
run;
The SAS System 09:11 Wednesday, August 1, 2012 1
Obs n muL muA sigma delta nc tcrit power
1 20 100 96.00 3.5 -1.14286 -5.11101 -1.72913 0.00053
2 20 100 96.25 3.5 -1.07143 -4.79157 -1.72913 0.00150
3 20 100 96.50 3.5 -1.00000 -4.47214 -1.72913 0.00390
4 20 100 96.75 3.5 -0.92857 -4.15270 -1.72913 0.00929
5 20 100 97.00 3.5 -0.85714 -3.83326 -1.72913 0.02033
6 20 100 97.25 3.5 -0.78571 -3.51382 -1.72913 0.04094
7 20 100 97.50 3.5 -0.71429 -3.19438 -1.72913 0.07597
8 20 100 97.75 3.5 -0.64286 -2.87494 -1.72913 0.13021
9 20 100 98.00 3.5 -0.57143 -2.55551 -1.72913 0.20668
10 20 100 98.25 3.5 -0.50000 -2.23607 -1.72913 0.30485
11 20 100 98.50 3.5 -0.42857 -1.91663 -1.72913 0.41961
12 20 100 98.75 3.5 -0.35714 -1.59719 -1.72913 0.54173
13 20 100 99.00 3.5 -0.28571 -1.27775 -1.72913 0.66005
14 20 100 99.25 3.5 -0.21429 -0.95831 -1.72913 0.76440
15 20 100 99.50 3.5 -0.14286 -0.63888 -1.72913 0.84815
16 20 100 99.75 3.5 -0.07143 -0.31944 -1.72913 0.90933
17 20 100 100.00 3.5 0.00000 0.00000 -1.72913 0.95000
18 20 100 100.25 3.5 0.07143 0.31944 -1.72913 0.97460
19 20 100 100.50 3.5 0.14286 0.63888 -1.72913 0.98814
20 20 100 100.75 3.5 0.21429 0.95831 -1.72913 0.99492
21 20 100 101.00 3.5 0.28571 1.27775 -1.72913 0.99800