Example 1
set matsize 100
use http://www.gseis.ucla.edu/courses/data/honors
describe
Contains data from http://www.philender.com/courses/data/honors.dta, clear
obs: 200
vars: 7 10 Feb 2001 16:27
size: 6,400 (99.8% of memory free)
-------------------------------------------------------------------------------
1. id float %9.0g
2. female float %9.0g fl
3. ses float %9.0g sl
4. lang float %9.0g language test score
5. math float %9.0g math score
6. science float %9.0g science score
7. honors float %9.0g
-------------------------------------------------------------------------------
summarize
Variable | Obs Mean Std. Dev. Min Max
---------+-----------------------------------------------------
id | 200 100.5 57.87918 1 200
female | 200 .545 .4992205 0 1
ses | 200 2.055 .7242914 1 3
lang | 200 52.23 10.25294 28 76
math | 200 52.645 9.368448 33 75
science | 200 51.85 9.900891 26 74
honors | 200 .265 .4424407 0 1
tab1 honors female
-> tabulation of honors
honors | Freq. Percent Cum.
------------+-----------------------------------
0 | 147 73.50 73.50
1 | 53 26.50 100.00
------------+-----------------------------------
Total | 200 100.00
-> tabulation of female
female | Freq. Percent Cum.
------------+-----------------------------------
male | 91 45.50 45.50
female | 109 54.50 100.00
------------+-----------------------------------
Total | 200 100.00
tabulate ses, gen(ses)
ses | Freq. Percent Cum.
------------+-----------------------------------
low | 47 23.50 23.50
middle | 95 47.50 71.00
high | 58 29.00 100.00
------------+-----------------------------------
Total | 200 100.00
logit honors lang math science female ses1 ses2
Logit estimates Number of obs = 200
LR chi2(6) = 89.49
Prob > chi2 = 0.0000
Log likelihood = -70.897289 Pseudo R2 = 0.3869
------------------------------------------------------------------------------
honors | Coef. Std. Err. z P>|z| [95% Conf. Interval]
---------+--------------------------------------------------------------------
lang | .0595035 .0290193 2.050 0.040 .0026266 .1163803
math | .1157581 .0355475 3.256 0.001 .0460864 .1854299
science | .0484799 .0332288 1.459 0.145 -.0166474 .1136072
female | 1.322503 .4762386 2.777 0.005 .3890923 2.255913
ses1 | .0068769 .6003709 0.011 0.991 -1.169828 1.183582
ses2 | -1.001258 .4860905 -2.060 0.039 -1.953978 -.0485382
_cons | -13.68829 2.194273 -6.238 0.000 -17.98899 -9.387597
------------------------------------------------------------------------------
logit honors lang math female ses1 ses2
Logit estimates Number of obs = 200
LR chi2(5) = 87.30
Prob > chi2 = 0.0000
Log likelihood = -71.994756 Pseudo R2 = 0.3774
------------------------------------------------------------------------------
honors | Coef. Std. Err. z P>|z| [95% Conf. Interval]
---------+--------------------------------------------------------------------
lang | .0687277 .0287044 2.394 0.017 .0124681 .1249873
math | .1358904 .0336874 4.034 0.000 .0698642 .2019166
female | 1.145726 .4513589 2.538 0.011 .2610792 2.030374
ses1 | -.0541296 .5945439 -0.091 0.927 -1.219414 1.111155
ses2 | -1.094532 .4833959 -2.264 0.024 -2.04197 -.1470932
_cons | -12.49919 1.926421 -6.488 0.000 -16.27491 -8.723475
------------------------------------------------------------------------------
test ses1 ses2
( 1) ses1 = 0.0
( 2) ses2 = 0.0
chi2( 2) = 6.13
Prob > chi2 = 0.0466
estimates store M1
logit honors lang math female, nolog
Logit estimates Number of obs = 200
LR chi2(3) = 80.87
Prob > chi2 = 0.0000
Log likelihood = -75.209827 Pseudo R2 = 0.3496
------------------------------------------------------------------------------
honors | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
lang | .0752424 .027577 2.73 0.006 .0211924 .1292924
math | .1317117 .0324607 4.06 0.000 .06809 .1953335
female | 1.154801 .4340856 2.66 0.008 .304009 2.005593
_cons | -13.12749 1.850769 -7.09 0.000 -16.75493 -9.50005
------------------------------------------------------------------------------
lrtest M1
likelihood-ratio test LR chi2(2) = 6.43
(Assumption: . nested in M1) Prob > chi2 = 0.0402
for var lang math female: generate s1X = ses1*X
for var lang math female: generate s2X = ses2*X
logit honors lang math female ses1 ses2 s1lang s2lang s1math s2math s1female s2female
Logit estimates Number of obs = 200
LR chi2(11) = 92.88
Prob > chi2 = 0.0000
Log likelihood = -69.202134 Pseudo R2 = 0.4016
------------------------------------------------------------------------------
honors | Coef. Std. Err. z P>|z| [95% Conf. Interval]
---------+--------------------------------------------------------------------
lang | .0342401 .0443933 0.771 0.441 -.0527693 .1212494
math | .2202793 .0750803 2.934 0.003 .0731245 .367434
female | .2074981 .7108037 0.292 0.770 -1.185652 1.600648
ses1 | -1.557294 6.22085 -0.250 0.802 -13.74993 10.63535
ses2 | 2.01131 4.949326 0.406 0.684 -7.689191 11.71181
s1lang | .1038843 .0901062 1.153 0.249 -.0727206 .2804892
s2lang | .0442549 .0648504 0.682 0.495 -.0828497 .1713594
s1math | -.0982415 .102635 -0.957 0.338 -.2994024 .1029194
s2math | -.1102176 .0908463 -1.213 0.225 -.2882731 .067838
s1female | 2.194595 1.544575 1.421 0.155 -.8327167 5.221907
s2female | 1.340724 1.047049 1.280 0.200 -.7114537 3.392902
_cons | -14.91288 3.908548 -3.815 0.000 -22.57349 -7.252265
------------------------------------------------------------------------------
test s1lang s2lang s1math s2math s1female s2female
( 1) s1lang = 0.0
( 2) s2lang = 0.0
( 3) s1math = 0.0
( 4) s2math = 0.0
( 5) s1female = 0.0
( 6) s2female = 0.0
chi2( 6) = 5.04
Prob > chi2 = 0.5390
logit honors lang math female ses1 ses2
Logit estimates Number of obs = 200
LR chi2(5) = 87.30
Prob > chi2 = 0.0000
Log likelihood = -71.994756 Pseudo R2 = 0.3774
------------------------------------------------------------------------------
honors | Coef. Std. Err. z P>|z| [95% Conf. Interval]
---------+--------------------------------------------------------------------
lang | .0687277 .0287044 2.394 0.017 .0124681 .1249873
math | .1358904 .0336874 4.034 0.000 .0698642 .2019166
female | 1.145726 .4513589 2.538 0.011 .2610792 2.030374
ses1 | -.0541296 .5945439 -0.091 0.927 -1.219414 1.111155
ses2 | -1.094532 .4833959 -2.264 0.024 -2.04197 -.1470932
_cons | -12.49919 1.926421 -6.488 0.000 -16.27491 -8.723475
------------------------------------------------------------------------------
logit, or
Logit estimates Number of obs = 200
LR chi2(5) = 87.30
Prob > chi2 = 0.0000
Log likelihood = -71.994756 Pseudo R2 = 0.3774
------------------------------------------------------------------------------
honors | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
---------+--------------------------------------------------------------------
lang | 1.071145 .0307466 2.394 0.017 1.012546 1.133134
math | 1.145556 .0385909 4.034 0.000 1.072363 1.223746
female | 3.144725 1.4194 2.538 0.011 1.29833 7.616932
ses1 | .9473093 .563217 -0.091 0.927 .2954031 3.037865
ses2 | .3346963 .1617908 -2.264 0.024 .1297728 .8632135
------------------------------------------------------------------------------
listcoef /* Long & Freese - findit spostado */
logit (N=200): Factor Change in Odds
Odds of: 1 vs 0
------------------------------------------------------------------
honors | b z P>|z| e^b e^bStdX SDofX
---------+--------------------------------------------------------
lang | 0.06873 2.394 0.017 1.0711 2.0232 10.2529
math | 0.13589 4.034 0.000 1.1456 3.5718 9.3684
female | 1.14573 2.538 0.011 3.1447 1.7718 0.4992
ses1 | -0.05413 -0.091 0.927 0.9473 0.9773 0.4251
ses2 | -1.09453 -2.264 0.024 0.3347 0.5781 0.5006
------------------------------------------------------------------
listcoef, percent /* Long & Freese */
logit (N=200): Percentage Change in Odds
Odds of: 1 vs 0
----------------------------------------------------------------------
honors | b z P>|z| % %StdX SDofX
-------------+--------------------------------------------------------
lang | 0.06873 2.394 0.017 7.1 102.3 10.2529
math | 0.13589 4.034 0.000 14.6 257.2 9.3684
female | 1.14573 2.538 0.011 214.5 77.2 0.4992
ses1 | -0.05413 -0.091 0.927 -5.3 -2.3 0.4251
ses2 | -1.09453 -2.264 0.024 -66.5 -42.2 0.5006
----------------------------------------------------------------------
fitstat /* Long & Freese */
Measures of Fit for logit of honors
Log-Lik Intercept Only: -115.644 Log-Lik Full Model: -71.995
D(194): 143.990 LR(5): 87.299
Prob > LR: 0.000
McFadden's R2: 0.377 McFadden's Adj R2: 0.326
Maximum Likelihood R2: 0.354 Cragg & Uhler's R2: 0.516
McKelvey and Zavoina's R2: 0.549 Efron's R2: 0.404
Variance of y*: 7.296 Variance of error: 3.290
Count R2: 0.830 Adj Count R2: 0.358
AIC: 0.780 AIC*n: 155.990
BIC: -883.884 BIC': -60.808
lfit
Logistic model for honors, goodness-of-fit test
number of observations = 200
number of covariate patterns = 189
Pearson chi2(183) = 166.48
Prob > chi2 = 0.8040
lfit, group(10)
Logistic model for honors, goodness-of-fit test
(Table collapsed on quantiles of estimated probabilities)
number of observations = 200
number of groups = 10
Hosmer-Lemeshow chi2(8) = 12.91
Prob > chi2 = 0.1151
lstat
Logistic model for honors
-------- True --------
Classified | D ~D | Total
-----------+--------------------------+-----------
+ | 31 12 | 43
- | 22 135 | 157
-----------+--------------------------+-----------
Total | 53 147 | 200
Classified + if predicted Pr(D) >= .5
True D defined as honors ~= 0
--------------------------------------------------
Sensitivity Pr( +| D) 58.49%
Specificity Pr( -|~D) 91.84%
Positive predictive value Pr( D| +) 72.09%
Negative predictive value Pr(~D| -) 85.99%
--------------------------------------------------
False + rate for true ~D Pr( +|~D) 8.16%
False - rate for true D Pr( -| D) 41.51%
False + rate for classified + Pr(~D| +) 27.91%
False - rate for classified - Pr( D| -) 14.01%
--------------------------------------------------
Correctly classified 83.00%
--------------------------------------------------
lroc
lsens
prchange /* Long & Freese */
logit: Changes in Predicted Probabilities for honors
min->max 0->1 -+1/2 -+sd/2 MargEfct
lang 0.4579 0.0004 0.0092 0.0947 0.0092
math 0.7851 0.0000 0.0182 0.1725 0.0182
female 0.1498 0.1498 0.1549 0.0768 0.1534
ses1 -0.0072 -0.0072 -0.0072 -0.0031 -0.0072
ses2 -0.1453 -0.1453 -0.1479 -0.0735 -0.1465
0 1
Pr(y|x) 0.8407 0.1593
lang math female ses1 ses2
x= 52.23 52.645 .545 .235 .475
sd(x)= 10.2529 9.36845 .49922 .425063 .500628
prtab math /* Long & Freese */
logit: Predicted probabilities of positive outcome for honors
----------------------
math |
score | Prediction
----------+-----------
33 | 0.0130
35 | 0.0169
37 | 0.0221
38 | 0.0252
39 | 0.0288
40 | 0.0329
41 | 0.0375
42 | 0.0427
43 | 0.0486
44 | 0.0553
45 | 0.0628
46 | 0.0713
47 | 0.0808
48 | 0.0915
49 | 0.1035
50 | 0.1168
51 | 0.1315
52 | 0.1479
53 | 0.1658
54 | 0.1855
55 | 0.2069
56 | 0.2301
57 | 0.2550
58 | 0.2817
59 | 0.3100
60 | 0.3398
61 | 0.3709
62 | 0.4031
63 | 0.4362
64 | 0.4698
65 | 0.5038
66 | 0.5377
67 | 0.5712
68 | 0.6042
69 | 0.6362
70 | 0.6670
71 | 0.6965
72 | 0.7244
73 | 0.7507
75 | 0.7980
----------------------
lang math female ses1 ses2
x= 52.23 52.645 .545 .235 .475
prtab female /* Long & Freese */
logit: Predicted probabilities of positive outcome for honors
----------------------
female | Prediction
----------+-----------
male | 0.0921
female | 0.2419
----------------------
lang math female ses1 ses2
x= 52.23 52.645 .545 .235 .475
prtab female, x(ses1=0 ses2=0) /* Long & Freese */
logit: Predicted probabilities of positive outcome for honors
----------------------
female | Prediction
----------+-----------
male | 0.1473
female | 0.3521
----------------------
lang math female ses1 ses2
x= 52.23 52.645 .545 0 0
prtab math female /* Long & Freese */
logit: Predicted probabilities of positive outcome for honors
--------------------------
math | female
score | male female
----------+---------------
33 | 0.0070 0.0216
35 | 0.0091 0.0282
37 | 0.0120 0.0367
38 | 0.0137 0.0418
39 | 0.0156 0.0476
40 | 0.0179 0.0541
41 | 0.0204 0.0615
42 | 0.0233 0.0698
43 | 0.0266 0.0792
44 | 0.0304 0.0897
45 | 0.0347 0.1014
46 | 0.0395 0.1145
47 | 0.0450 0.1290
48 | 0.0512 0.1451
49 | 0.0582 0.1628
50 | 0.0661 0.1821
51 | 0.0750 0.2033
52 | 0.0850 0.2262
53 | 0.0962 0.2508
54 | 0.1087 0.2772
55 | 0.1226 0.3052
56 | 0.1380 0.3348
57 | 0.1549 0.3657
58 | 0.1736 0.3978
59 | 0.1939 0.4307
60 | 0.2161 0.4643
61 | 0.2400 0.4982
62 | 0.2656 0.5321
63 | 0.2930 0.5658
64 | 0.3219 0.5988
65 | 0.3522 0.6310
66 | 0.3838 0.6620
67 | 0.4164 0.6917
68 | 0.4498 0.7199
69 | 0.4836 0.7465
70 | 0.5175 0.7713
71 | 0.5513 0.7944
72 | 0.5847 0.8157
73 | 0.6172 0.8353
75 | 0.6791 0.8694
--------------------------
lang math female ses1 ses2
x= 52.23 52.645 .545 .235 .475
adjust , by(female) pr
-------------------------------------------------------------------------------------------------------------------
Dependent variable: honors Command: logit
Variables left as is: lang, math, ses1, ses2
-------------------------------------------------------------------------------------------------------------------
----------------------
female | pr
----------+-----------
male | .095504
female | .235793
----------------------
Key: pr = Probability
adjust , by(math female) pr
-------------------------------------------------------------------------------------------------------------------
Dependent variable: honors Command: logit
Variables left as is: lang, ses1, ses2
-------------------------------------------------------------------------------------------------------------------
----------------------------
math | female
score | male female
----------+-----------------
33 | .00505
35 | .010903
37 | .007063
38 | .009424 .012157
39 | .010295 .024776
40 | .00719 .032006
41 | .010836 .040107
42 | .012414 .038243
43 | .023918 .049328
44 | .02681 .085487
45 | .010555 .091812
46 | .010719 .100966
47 | .086323 .040134
48 | .167292 .066036
49 | .071675 .154055
50 | .086665 .183269
51 | .065887 .188285
52 | .051212 .131086
53 | .206648
54 | .11679 .178969
55 | .143084 .208708
56 | .446248 .446734
57 | .123998 .589668
58 | .337277 .447585
59 | .282453
60 | .194704 .604963
61 | .207849 .678166
62 | .402635 .837825
63 | .378684 .575784
64 | .668068 .824284
65 | .870542
66 | .485724 .662899
67 | .889047
68 | .770061
69 | .932625
70 | .595297
71 | .789501 .932428
72 | .906185
73 | .793049
75 | .750208
----------------------------
Key: Probability
adjust lang, by(math female) pr
-------------------------------------------------------------------------------------------------------------------
Dependent variable: honors Command: logit
Variables left as is: ses1, ses2
Covariate set to mean: lang = 52.23
-------------------------------------------------------------------------------------------------------------------
----------------------------
math | female
score | male female
----------+-----------------
33 | .012444
35 | .005231
37 | .02124
38 | .023074 .024257
39 | .019899 .04572
40 | .010267 .061276
41 | .016532 .075401
42 | .02239 .076264
43 | .042274 .097861
44 | .049387 .137197
45 | .020055 .124614
46 | .022908 .138586
47 | .072443 .077881
48 | .082121 .088217
49 | .062364 .143865
50 | .105924 .17798
51 | .066866 .22859
52 | .050318 .177709
53 | .204419
54 | .141706 .213936
55 | .073775 .247733
56 | .214219 .373134
57 | .130849 .427589
58 | .19897 .347533
59 | .1875
60 | .135797 .50168
61 | .237308 .535593
62 | .262773 .659572
63 | .324902 .426229
64 | .44706 .71035
65 | .74097
66 | .380355 .65874
67 | .792628
68 | .582004
69 | .833775
70 | .379482
71 | .502247 .868116
72 | .834707
73 | .478994
75 | .546789
----------------------------
Key: ProbabilityExample 2
use http://www.philender.com/courses/data/api2000, clear
describe
Contains data from api2000.dta
obs: 250
vars: 8 10 Feb 2001 14:58
size: 5,500 (99.9% of memory free)
-------------------------------------------------------------------------------
1. snum float %9.0g school number
2. api2000 int %6.0g
3. apigoal float %9.0g api>=800
4. meals byte %4.0f pct free meals
5. ell byte %4.0f english language learners
6. aved float %9.0g avg parent ed
7. full byte %4.0f pct full credential
8. emer byte %4.0f pct emer credential
-------------------------------------------------------------------------------
summarize
Variable | Obs Mean Std. Dev. Min Max
---------+-----------------------------------------------------
snum | 250 3165.612 1757.88 25 6186
api2000 | 250 669.92 137.6566 366 953
apigoal | 250 .2 .4008024 0 1
meals | 250 51.456 31.96321 0 100
ell | 250 26.352 25.60583 0 91
aved | 250 2.7422 .7750297 1 4.62
full | 250 87.684 13.57147 34 100
emer | 250 10.928 11.55512 0 63
tab apigoal
api>=800 | Freq. Percent Cum.
------------+-----------------------------------
0 | 200 80.00 80.00
1 | 50 20.00 100.00
------------+-----------------------------------
Total | 250 100.00
regress api2000 meals ell aved full
Source | SS df MS Number of obs = 250
---------+------------------------------ F( 4, 245) = 347.64
Model | 4011582.91 4 1002895.73 Prob > F = 0.0000
Residual | 706799.486 245 2884.89586 R-squared = 0.8502
---------+------------------------------ Adj R-squared = 0.8478
Total | 4718382.40 249 18949.3269 Root MSE = 53.711
------------------------------------------------------------------------------
api2000 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
meals | -1.901098 .2629118 -7.231 0.000 -2.418954 -1.383243
ell | -.7244631 .2445901 -2.962 0.003 -1.206231 -.2426955
aved | 56.16825 8.940971 6.282 0.000 38.55728 73.77923
full | 1.217558 .3173935 3.836 0.000 .5923897 1.842726
_cons | 526.0491 45.99386 11.437 0.000 435.4552 616.6429
------------------------------------------------------------------------------
logit apigoal meals ell aved full
Logit estimates Number of obs = 250
LR chi2(4) = 157.28
Prob > chi2 = 0.0000
Log likelihood = -46.459034 Pseudo R2 = 0.6286
------------------------------------------------------------------------------
apigoal | Coef. Std. Err. z P>|z| [95% Conf. Interval]
---------+--------------------------------------------------------------------
meals | -.1073431 .0324698 -3.306 0.001 -.1709829 -.0437034
ell | .0148865 .038053 0.391 0.696 -.0596961 .0894691
aved | 2.199172 .7782202 2.826 0.005 .6738885 3.724456
full | .0299931 .0397431 0.755 0.450 -.047902 .1078881
_cons | -8.514938 4.873673 -1.747 0.081 -18.06716 1.037286
------------------------------------------------------------------------------
logit apigoal meals aved
Logit estimates Number of obs = 250
LR chi2(2) = 156.68
Prob > chi2 = 0.0000
Log likelihood = -46.762399 Pseudo R2 = 0.6262
------------------------------------------------------------------------------
apigoal | Coef. Std. Err. z P>|z| [95% Conf. Interval]
---------+--------------------------------------------------------------------
meals | -.1038993 .0286783 -3.623 0.000 -.1601077 -.0476909
aved | 2.211981 .776815 2.848 0.004 .6894518 3.734511
_cons | -5.697189 2.959334 -1.925 0.054 -11.49738 .1029997
------------------------------------------------------------------------------
logit, or
Logit estimates Number of obs = 250
LR chi2(2) = 156.68
Prob > chi2 = 0.0000
Log likelihood = -46.762399 Pseudo R2 = 0.6262
------------------------------------------------------------------------------
apigoal | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
---------+--------------------------------------------------------------------
meals | .9013161 .0258482 -3.623 0.000 .852052 .9534285
aved | 9.133795 7.095269 2.848 0.004 1.992623 41.86753
------------------------------------------------------------------------------
listcoef /* Long & Freese */
logit (N=250): Factor Change in Odds
Odds of: 1 vs 0
------------------------------------------------------------------
apigoal | b z P>|z| e^b e^bStdX SDofX
---------+--------------------------------------------------------
meals | -0.10390 -3.623 0.000 0.9013 0.0361 31.9632
aved | 2.21198 2.848 0.004 9.1338 5.5531 0.7750
------------------------------------------------------------------
fitstat /* Long & Freese */
Measures of Fit for logit of apigoal
Log-Lik Intercept Only: -125.101 Log-Lik Full Model: -46.762
D(247): 93.525 LR(2): 156.676
Prob > LR: 0.000
McFadden's R2: 0.626 McFadden's Adj R2: 0.602
Maximum Likelihood R2: 0.466 Cragg & Uhler's R2: 0.736
McKelvey and Zavoina's R2: 0.879 Efron's R2: 0.675
Variance of y*: 27.170 Variance of error: 3.290
Count R2: 0.940 Adj Count R2: 0.700
AIC: 0.398 AIC*n: 99.525
BIC: -1270.276 BIC': -145.633
Example 3Example 3 involves the use of blocked data, i.e., each observation consists of the number of occurrances of a variable and the number of observations in the population. The syntax for blogit looks like this,
blogit pos_var pop_var [predictors] [if exp] [in range] [, logit_options]This example is from Ashford and Snowden (1970), "Multivariate probit analysis."
use http://www.philender.com/courses/data/ashford, clear
describe
Contains data from http://www.gseis.ucla.edu/courses/data/ashford.dta
obs: 9 from Ashford & Snowden - 1970
vars: 4 15 Feb 2001 22:58
size: 117 (100.0% of memory free)
-------------------------------------------------------------------------------
1. age byte %8.0g
2. pop int %8.0g population
3. cases int %8.0g cases of breathlessness
4. opro float %9.0g observed proportion
-------------------------------------------------------------------------------
list
age pop cases opro
1. 22 1952 15 .0076844
2. 27 1791 32 .0178671
3. 32 2113 73 .034548
4. 37 2783 167 .0600072
5. 42 2274 223 .0980651
6. 47 2393 357 .1491851
7. 52 2090 521 .2492823
8. 57 1750 558 .3188571
9. 62 1136 478 .4207746
blogit cases pop age
Logit estimates Number of obs = 18282
LR chi2(1) = 2333.72
Prob > chi2 = 0.0000
Log likelihood = -5986.5132 Pseudo R2 = 0.1631
------------------------------------------------------------------------------
_outcome | Coef. Std. Err. z P>|z| [95% Conf. Interval]
---------+--------------------------------------------------------------------
age | .1028125 .0024594 41.803 0.000 .0979921 .1076329
_cons | -6.581895 .1244537 -52.886 0.000 -6.82582 -6.33797
------------------------------------------------------------------------------
blogit cases pop age, or
Logit estimates Number of obs = 18282
LR chi2(1) = 2333.72
Prob > chi2 = 0.0000
Log likelihood = -5986.5132 Pseudo R2 = 0.1631
------------------------------------------------------------------------------
_outcome | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
age | 1.108284 .0027257 41.80 0.000 1.102954 1.113639
------------------------------------------------------------------------------
predict pl, p
list age opro pl
age opro pl
1. 22 .0076844 .0131251
2. 27 .0178671 .0217541
3. 32 .034548 .0358503
4. 37 .0600072 .0585339
5. 42 .0980651 .0941684
6. 47 .1491851 .1480843
7. 52 .2492823 .2251952
8. 57 .3188571 .3270449
9. 62 .4207746 .4483058
Categorical Data Analysis Course
Phil Ender