data diagnosis(drop=alpha);
sen=0.8;
spe=.;
prop_pos=0.6;
alpha=0.05;
delta=0.1;
n_pos=ceil((probit(1-alpha/2)**2*sen*(1-sen))/(delta)**2);
n_neg=ceil((probit(1-alpha/2)**2*spe*(1-spe))/(delta)**2);
if spe=. then n_total=ceil(n_pos/prop_pos);
if sen=. then n_total=ceil(n_neg/(1-prop_pos));
label sen="灵敏度";
label spe="特异度";
label delta="精确度";
label prop_pos="患病的比例";
label n_pos="患病数";
label n_neg="无病数";
label n_total="总例数";
proc print label;
run;
