### Stata Textbook Examples Applied Logistic Regression by Hosmer and Lemeshow Chapter 2: The Multiple Logistic Regression Model

This chapter makes use of the lowbwt file.
use lowbwt

Table 2.2 -- page 30
/* create dummy coding for the variable race */
xi i.race
i.race                Irace_1-3    (naturally coded; Irace_1 omitted)

logit low age lwt Irace_2 Irace_3 ftv

Iteration 0:   log likelihood =   -117.336
Iteration 1:   log likelihood = -111.41656
Iteration 2:   log likelihood = -111.28677
Iteration 3:   log likelihood = -111.28645

Logit estimates                                   Number of obs   =        189
LR chi2(5)      =      12.10
Prob > chi2     =     0.0335
Log likelihood = -111.28645                       Pseudo R2       =     0.0516

------------------------------------------------------------------------------
low |      Coef.   Std. Err.       z     P>|z|       [95% Conf. Interval]
---------+--------------------------------------------------------------------
age |   -.023823   .0337295     -0.706   0.480      -.0899317    .0422857
lwt |  -.0142446   .0065407     -2.178   0.029      -.0270641   -.0014251
Irace_2 |   1.003898   .4978579      2.016   0.044       .0281143    1.979681
Irace_3 |   .4331084   .3622397      1.196   0.232      -.2768684    1.143085
ftv |  -.0493083   .1672386     -0.295   0.768      -.3770899    .2784733
_cons |   1.295366   1.071439      1.209   0.227      -.8046157    3.395347
------------------------------------------------------------------------------
Table 2.3 -- page 32
logit low lwt Irace_2 Irace_3

Iteration 0:   log likelihood =   -117.336
Iteration 1:   log likelihood =  -111.7491
Iteration 2:   log likelihood = -111.62983
Iteration 3:   log likelihood = -111.62955

Logit estimates                                   Number of obs   =        189
LR chi2(3)      =      11.41
Prob > chi2     =     0.0097
Log likelihood = -111.62955                       Pseudo R2       =     0.0486

------------------------------------------------------------------------------
low |      Coef.   Std. Err.       z     P>|z|       [95% Conf. Interval]
---------+--------------------------------------------------------------------
lwt |  -.0152231   .0064393     -2.364   0.018      -.0278439   -.0026023
Irace_2 |   1.081066   .4880512      2.215   0.027       .1245034    2.037629
Irace_3 |   .4806033   .3566733      1.347   0.178      -.2184636     1.17967
_cons |   .8057535   .8451625      0.953   0.340      -.8507345    2.462241
------------------------------------------------------------------------------

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.