UCLA Academic Technology Services HomeServicesClassesContactJobs
Search

Stata Textbook Examples
Computer-Aided Multivariate Analysis by Afifi and Clark
Chapter 12: Logistic Regression

Page 282 The coefficients in the middle of the page.
use http://www.ats.ucla.edu/stat/stata/examples/cama3/depress.dta, clear

logit cases age income

Iteration 0:   log likelihood = -134.06225
Iteration 1:   log likelihood = -127.42024
Iteration 2:   log likelihood = -127.01794
Iteration 3:   log likelihood = -127.01305
Iteration 4:   log likelihood = -127.01304

Logit estimates                                   Number of obs   =        294
                                                  LR chi2(2)      =      14.10
                                                  Prob > chi2     =     0.0009
Log likelihood = -127.01304                       Pseudo R2       =     0.0526

------------------------------------------------------------------------------
       cases |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         age |  -.0201671   .0088966    -2.27   0.023    -.0376041   -.0027301
      income |  -.0413479   .0140587    -2.94   0.003    -.0689025   -.0137933
       _cons |   .0279774   .4872007     0.06   0.954    -.9269184    .9828732
------------------------------------------------------------------------------
Figure 12.1, page 283. 
NOTE: We were unable to reproduce this graph.
Table 12.1, page 286.
tab sex cases

           | depressed is cesd >=16
           |          
       sex |    normal  depressed |     Total
-----------+----------------------+----------
      male |       101         10 |       111 
    female |       143         40 |       183 
-----------+----------------------+----------
     Total |       244         50 |       294 
Page 286 The estimates at the bottom of the page.
gen sex1 = sex - 1
logit cases sex1

Iteration 0:   log likelihood = -134.06225
Iteration 1:   log likelihood = -129.83832
Iteration 2:   log likelihood = -129.69929
Iteration 3:   log likelihood = -129.69883

Logit estimates                                   Number of obs   =        294
                                                  LR chi2(1)      =       8.73
                                                  Prob > chi2     =     0.0031
Log likelihood = -129.69883                       Pseudo R2       =     0.0325

------------------------------------------------------------------------------
       cases |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        sex1 |    1.03857   .3766834     2.76   0.006     .3002844    1.776856
       _cons |  -2.312535   .3315077    -6.98   0.000    -2.962279   -1.662792
------------------------------------------------------------------------------
Page 287 The odds ratios at the top of the page.
logit cases sex, or

Iteration 0:   log likelihood = -134.06225
Iteration 1:   log likelihood = -129.83832
Iteration 2:   log likelihood = -129.69929
Iteration 3:   log likelihood = -129.69883

Logit estimates                                   Number of obs   =        294
                                                  LR chi2(1)      =       8.73
                                                  Prob > chi2     =     0.0031
Log likelihood = -129.69883                       Pseudo R2       =     0.0325

------------------------------------------------------------------------------
       cases | Odds Ratio   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         sex |   2.825175   1.064196     2.76   0.006     1.350243    5.911243
------------------------------------------------------------------------------
Page 288  Table of coefficients and standard errors.
logit cases age income

Iteration 0:   log likelihood = -134.06225
Iteration 1:   log likelihood = -127.42024
Iteration 2:   log likelihood = -127.01794
Iteration 3:   log likelihood = -127.01305
Iteration 4:   log likelihood = -127.01304

Logit estimates                                   Number of obs   =        294
                                                  LR chi2(2)      =      14.10
                                                  Prob > chi2     =     0.0009
Log likelihood = -127.01304                       Pseudo R2       =     0.0526

------------------------------------------------------------------------------
       cases |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         age |  -.0201671   .0088966    -2.27   0.023    -.0376041   -.0027301
      income |  -.0413479   .0140587    -2.94   0.003    -.0689025   -.0137933
       _cons |   .0279774   .4872007     0.06   0.954    -.9269184    .9828732
------------------------------------------------------------------------------
Figure 12.2, page 294.
lsens
Figure 12.3, page 295.
lroc

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.