Chapter Contents 
Previous 
Next 
The LOGISTIC Procedure 
This example plots an ROC curve, estimates a customized odds ratio, produces the traditional goodnessoffit analysis, displays the generalized R^{2} measures for the fitted model, and calculates the normal confidence intervals for the regression parameters. The data consist of three variables: n (number of subjects in a sample), disease (number of diseased subjects in the sample), and age (age for the sample). A linear logistic regression model is used to study the effect of age on the probability of contracting the disease.
The SAS code is as follows:
data Data1; input disease n age; datalines; 0 14 25 0 20 35 0 19 45 7 18 55 6 12 65 17 17 75 ;
proc logistic data=Data1; model disease/n=age / scale=none clparm=wald clodds=pl rsquare outroc=roc1; units age=10; run;
The option SCALE=NONE is specified to produce the deviance and Pearson goodnessoffit analysis without adjusting for overdispersion. The RSQUARE option is specified to produce generalized R^{2} measures of the fitted model. The CLPARM=WALD option is specified to produce the Wald confidence intervals for the regression parameters. The UNITS statement is specified to produce customized odds ratio estimates for a change of 10 years in the age variable, and the CLODDS=PL option is specified to produce profile likelihood confidence limits for the odds ratio. The OUTROC= option outputs the data for the ROC curve to the SAS data set, roc1.
Results are shown in Output 39.6.1 and Output 39.6.2.
Output 39.6.1: Deviance and Pearson GoodnessofFit Analysis

The ROC curve is plotted by the GPLOT procedure, and the plot is shown in Output 39.6.3.
symbol1 i=join v=none c=blue; proc gplot data=roc1; title 'ROC Curve'; plot _sensit_*_1mspec_=1 / vaxis=0 to 1 by .1 cframe=ligr; run;Output 39.6.3: Receiver Operating Characteristic Curve
Chapter Contents 
Previous 
Next 
Top 
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.