UCLA Academic Technology Services HomeServicesClassesContactJobs

SAS Textbook Examples
Computer-Aided Multivariate Analysis by Afifi and Clark
Chapter 12: Logistic regression

Page 282 The coefficients in the middle of the page.
data depress;
set "c:\cama3\depress";
run;
proc logistic data = depress desc;
model cases = age income;
run;
The LOGISTIC Procedure

             Analysis of Maximum Likelihood Estimates

                               Standard          Wald
Parameter    DF    Estimate       Error    Chi-Square    Pr > ChiSq

Intercept     1      0.0280      0.4872        0.0033        0.9542
AGE           1     -0.0202     0.00890        5.1385        0.0234
INCOME        1     -0.0413      0.0141        8.6500        0.0033
<some output omitted>
Page 283 Figure 12.1  Logistic function for the depression data set.
We were unable to reproduce this graph.
Page 286 Table 12.1  Classification of individuals by depression level and sex.
proc freq data = depress;
tables sex*cases;
run;
The FREQ Procedure

Table of SEX by CASES

SEX       CASES

Frequency|
Percent  |
Row Pct  |
Col Pct  |       0|       1|  Total
---------+--------+--------+
       1 |    101 |     10 |    111
         |  34.35 |   3.40 |  37.76
         |  90.99 |   9.01 |
         |  41.39 |  20.00 |
---------+--------+--------+
       2 |    143 |     40 |    183
         |  48.64 |  13.61 |  62.24
         |  78.14 |  21.86 |
         |  58.61 |  80.00 |
---------+--------+--------+
Total         244       50      294
            82.99    17.01   100.00
Page 286 The estimates at the bottom of the page.
data depress;
set depress;
sex1 = sex - 1;
run;
proc logistic data = depress desc;
model cases = sex1;
run;
The LOGISTIC Procedure

             Analysis of Maximum Likelihood Estimates

                               Standard          Wald
Parameter    DF    Estimate       Error    Chi-Square    Pr > ChiSq

Intercept     1     -2.3125      0.3315       48.6603        <.0001
sex1          1      1.0385      0.3767        7.6013        0.0058

           Odds Ratio Estimates

             Point          95% Wald
Effect    Estimate      Confidence Limits

sex1         2.825       1.350       5.911
<some output omitted>
Page 287 The odds ratios at the top of the page.
NOTE:  This is given as part of the output from the proc logistic above.
Page 288 Table of coefficients and standard errors.
proc logistic data = depress desc;
model cases = age income;
run;
The LOGISTIC Procedure

             Analysis of Maximum Likelihood Estimates

                               Standard          Wald
Parameter    DF    Estimate       Error    Chi-Square    Pr > ChiSq

Intercept     1      0.0280      0.4872        0.0033        0.9542
AGE           1     -0.0202     0.00890        5.1385        0.0234
INCOME        1     -0.0413      0.0141        8.6500        0.0033
<some output omitted>
Page 294 Figure 12.2  Percentage of individuals correctly classified by logistic regression.
We were unable to reproduce this graph.
Page 295 Figure 12.3  ROC curve from logistic regression for the depression data set.
We were unable to reproduce this graph.

How to cite this page

Report an error on this page

UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services


The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California.