I am running a logistic regression on a binary dependent variable. I got the following answers after applying the following code:
How can I know if my model is fit or not? As my Prob > chi2 = 0.0000 but my number of observation is large, how can I interpret my goodness of fit for this?
Code:
estat classification
Logistic model for improved
-------- True --------
Classified | D ~D | Total
-----------+--------------------------+-----------
+ | 4362 2617 | 6979
- | 3899 7113 | 11012
-----------+--------------------------+-----------
Total | 8261 9730 | 17991
Classified + if predicted Pr(D) >= .5
True D defined as improved != 0
--------------------------------------------------
Sensitivity Pr( +| D) 52.80%
Specificity Pr( -|~D) 73.10%
Positive predictive value Pr( D| +) 62.50%
Negative predictive value Pr(~D| -) 64.59%
--------------------------------------------------
False + rate for true ~D Pr( +|~D) 26.90%
False - rate for true D Pr( -| D) 47.20%
False + rate for classified + Pr(~D| +) 37.50%
False - rate for classified - Pr( D| -) 35.41%
--------------------------------------------------
Correctly classified 63.78%
--------------------------------------------------
.
.
.
.
.
. lroc
Logistic model for improved
number of observations = 17991
area under ROC curve = 0.6835
.
.
.
.
.
. lfit, group(10) table
Logistic model for improved, goodness-of-fit test
(Table collapsed on quantiles of estimated probabilities)
+----------------------------------------------------------+
| Group | Prob | Obs_1 | Exp_1 | Obs_0 | Exp_0 | Total |
|-------+--------+-------+--------+-------+--------+-------|
| 1 | 0.2610 | 419 | 430.4 | 1418 | 1406.6 | 1837 |
| 2 | 0.3300 | 659 | 685.8 | 1634 | 1607.2 | 2293 |
| 3 | 0.3389 | 464 | 431.3 | 817 | 849.7 | 1281 |
| 4 | 0.4072 | 615 | 698.5 | 1255 | 1171.5 | 1870 |
| 5 | 0.4315 | 752 | 724.4 | 969 | 996.6 | 1721 |
|-------+--------+-------+--------+-------+--------+-------|
| 6 | 0.4984 | 895 | 844.5 | 931 | 981.5 | 1826 |
| 7 | 0.5227 | 1013 | 964.9 | 869 | 917.1 | 1882 |
| 8 | 0.5948 | 969 | 995.5 | 763 | 736.5 | 1732 |
| 9 | 0.6732 | 1230 | 1199.1 | 654 | 684.9 | 1884 |
| 10 | 0.9740 | 1245 | 1286.7 | 420 | 378.3 | 1665 |
+----------------------------------------------------------+
number of observations = 17991
number of groups = 10
Hosmer-Lemeshow chi2(8) = 43.71
Prob > chi2 = 0.0000

Comment