/* set the graphics environment */ goptions reset=global gunit=pct border ftext=swissb htitle=6 htext=3; data drug; input response doselvl; cards; 0.5 1.0 2.3 2.0 3.4 3.0 11.5 3.5 10.9 3.5 24.0 4.0 25.3 4.0 39.6 4.5 37.9 4.5 54.7 5.0 56.8 5.0 70.8 5.5 68.4 5.5 82.1 6.0 80.6 6.0 89.2 6.5 94.8 7.0 96.2 8.0 96.4 9.0 ; proc model; response = gamma0-(gamma0/(1+(doselvl/gamma2)**gamma1)); fit response start=(gamma0=100 gamma1=5 gamma2=4.8); run; proc nlin data=drug; model response = gamma0-(gamma0/(1+(doselvl/gamma2)**gamma1)); parms gamma0=100 gamma1=5 gamma2=4.8; der.gamma0 = 1-(1/(1+(doselvl/gamma2)**gamma1)); der.gamma2 = -(((doselvl/gamma2)**gamma1)*log(doselvl/gamma2)*gamma0)/((doselvl/gamma2)**gamma1+1)**2; der.gamma1 = ((((doselvl/gamma2)**gamma1)*gamma1)*gamma0)/((gamma2*((doselvl/gamma2)**gamma1+1)**2)); output out=nout p=pred r=resid parms=gamma0 gamma1 gamma2; run; data nout; proc print; /* define symbol characteristics */ /*symbol interpol=none regression analysis with */ symbol interpol=NONE /* regression analysis with */ /* confidence limits */ value=diamond /* plot symbol */ height=3 /* plot symbol height */ cv=red /* plot symbol color */ ci=blue /* regression line color */ co=green /* confidence limits color */ width=2; /* line width */ /* produce plot */ proc gplot data=nout; plot response*doselvl pred*doselvl/overlay; plot resid*doselvl resid*pred; run; /* define symbol characteristics */ /*symbol interpol=none regression analysis with */ symbol interpol=join /* regression analysis with */ /* confidence limits */ value=diamond /* plot symbol */ height=3 /* plot symbol height */ cv=red /* plot symbol color */ ci=blue /* regression line color */ co=green /* confidence limits color */ width=2; /* line width */ /* produce plot */ proc gplot data=nout; plot pred*doselvl; run; TITLE3 'Normal Probability Plots'; %nqplot(data=nout,var=RESID) run;