运行之后出现问题,确实不是很懂,求教!
PROC IML;
start MTE2co ( a, Lelr, Uelr, rm, ca, power );
error = 0;
if ( a>1 | a<0 ) then do; error =1; print “error”
“Test significance level must be in 0-1”; end;
If ( Lelr>Uelr ) then do; error=1; print “error”
“Lower equivalence limit ratio must be <=Upper equivalence
limit ratio”; end;
if ( Uelr < Lelr ) then do; error=1; print “error”
“Upper equivalence limit ratio must be >=Lowerequivalence
limit ratio”; end;
if ( rm <= Lelr | rm >=Uelr) then do; error=1;
print “error”“Expected ratio must be inLeld-Ueld”;
end;
if ( rm<=0 ) then do; error=1; print “error” “Expetted ratio must be >0”; end;
if ( power>100 | power<1 ) then do; error=1;
print “error” “Power(%)must be in 1-100”; end;
if ( error = 1 )then stop;
if (error = 0) then do;
sd = ca/sqrt(2); SDD=2*sd; n=2;
do until(pwl+pw2-1 >=power/100);
L_ncp = abs(log(rm)-log(Lelr))#sqrt(n)/(sd#sqrt(2));
U_ncp = abs(log(rm)-log(Uelr))#sqrt(n)/(sd#sqn(2));
df=2*(n-1); t=tinv(1-a,df);
pw1 = 1-probt(t, df, L_ncp);
pw2 = 1-probt(t, df, U_ncp);
n = n+0.01; end;
n = ceil(n-0.01);
print a[1abel = “Test significance level”]
Lelr [ label =“Lower equivalence limitratio”]
Uelr [ 1abel =“Upper equivalence limitratio”]
rm [ label =“Expected ratio”]
ca [ 1abel = “Crossover ANOVA,sqrt(MSE)” ]
SDD [ label = “SD differences” ]
Power [ 1abel= “Power(%)” ]
N [ label=“n per sequence group”]; end;
finish MTE2co;
run MTE2co(0.025, 0.8, 1.25, 1, 0.198, 90)
run MTE2co(0.025, 0.8, 1.25, 1, 0.294, 90)
quit;