/* Use the following SAS statements in conjuction with data set DATA=A */ /* (shown in Output 10.9) to obtain Outputs 10.15 and 10.16 */ proc genmod data=a; class clinic trt; model fav/nij=clinic trt/dist=binomial link=probit type3; lsmeans trt; estimate 'lsm - cntl' intercept 1 trt 1 0; estimate 'lsm - drug' intercept 1 trt 0 1; estimate 'diff' trt 1 -1; contrast 'diff' trt 1 -1; ods output lsmeans=lsm; run; /* creates Output 10.16 */ data prob_hat; set lsm; phat=probnorm(estimate); pi=3.14159; invsqrt=1/sqrt(2*pi); se_phat=invsqrt*exp(-0.5*(estimate**2))*stderr; proc print data=prob_hat; run;