17Means
XpXtSE1
1021
−− +
−β
is a one-sided 100(1 − β) percent upper condence limit for μ
1
– (1 – p
0
)μ
2
.
From the example, the 95 percent upper condence limit for μ
1
– (1 – p
0
)μ
2
is
−β
XpXtSE1 93.5 –(0.95)*100.0 (1.701)*0.997
1021
.
Computational considerations:
• SAS code
libname stuff 'H:\Personal Data\Equivalence & Noninferiority\
Programs & Output';
data calc;
set stuff.d20121104_test_2_3_prop;
run;
proc means data = calc;
var X1 X2 p0 beta;
output out = onemean MEAN = xbar1 xbar2 p0val betaprob STD =
sd1 sd2 N = n1 n2;
run;
data outcalc;
set onemean;
se = sqrt(sd1**2/n1 + ((1-p0val)**2)*sd2**2/n2);
w1 = ((sd1**2/n1)/(sd1**2/n1 + sd2**2/n2))**2/(n1-1);
w2 = ((sd2**2/n1)/(sd1**2/n1 + sd2**2/n2))**2/(n2-1);
dfe = 1/(w1 + w2);
lowlim = xbar1 - (1-p0val)*xbar2 + tinv(1-betaprob,dfe)*se;
run;
proc print data = outcalc;/* has vars xbar1 xbar2 p0val
betaprob n1 n2 se lowlim */
run;
The MEANS Procedure
Variable Label N Mean Std Dev Minimum Maximum
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
X1 X1 25 8.8799300 1.0305582 7.3220509 11.6006410
X2 X2 25 9.6829027 1.0045857 7.4892100 12.0170228
p0 p0 25 0.1000000 0 0.1000000 0.1000000
beta beta 25 0.0500000 0 0.0500000 0.0500000
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ