[Limdep Nlogit List] Hosmer Lemeshow

Durham, Cathy cathy.durham at oregonstate.edu
Wed May 9 15:00:12 EST 2007


I've been trying to replicate the Hosmer-Lemeshow statistic from running
the data and simple probit 
regression below. I copy the the y's and predictions from the List
command into a spreadsheet and sort on Predicted Yi. I then calculated
the Hosmer Lemeshow according to the formula on E15.28 with 10 groups of
5. In the formula
I assume that Pj hat bar is the subgroup average of P hat as shown on
the following page.
The printout gives


| Binomial Probit Model                       |
| Maximum Likelihood Estimates                |
| Model estimated: May 08, 2007 at 08:56:18PM.|
| Dependent variable                GRADE     |
| Weighting variable                 None     |
| Number of observations               50     |
| Iterations completed                  5     |
| Log likelihood function       -30.11588     |
| Restricted log likelihood     -34.16575     |
| Chi squared                    8.099730     |
| Degrees of freedom                    1     |
| Prob[ChiSqd > value] =         .4427187E-02 |
| Hosmer-Lemeshow chi-squared =  29.10785     |
| P-value=  .00030 with deg.fr. =       8     |

but my calculation of the formula gives 5.7034. I've tried several other
H-L formulas,
but have not found one that is for fractional data and none produced
this result.
I'll check the Hosmer Lemeshow book Applied Logistic Regression
tomorrow, but if anyone has figured this out I would appreciate any
help.


? Altered Spector Data
Read ; Nobs = 50 ; Nvar = 5 
     ; names = OBS,GPA,TUCE,PSI,GRADE $
  1   2.66     20    0      0
  2   2.89     22    0      0.5 
  3   3.28     24    0      0.5   
  4   2.92     12    0      0 
  5   4.00     21    0      1  
  6   2.86     17    0      0
  7   2.76     17    0      0.5
  8   2.87     21    0      0
  9   3.03     25    0      0   
 10   3.92     29    0      1   
 11   2.63     20    0      0.5 
 12   3.32     23    0      0
 13   3.57     23    0      0 
 14   3.26     25    0      1 
 15   3.53     26    0      0  
 16   2.74     19    0      0  
 17   2.75     25    0      0
 18   2.83     19    0      0
 19   3.12     23    1      0
 20   3.16     25    1      1
 21   2.06     22    1      0
 22   3.62     28    1      1
 23   2.89     14    1      0
 24   3.51     26    1      0
 25   3.54     24    1      1
 26   2.83     27    1      1
 27   3.39     17    1      1
 28   2.67     24    1      0
 29   3.65     21    1      1
 30   4.00     23    1      1
 31   3.10     21    1      0
 32   2.39     19    1      1
33   2.66     20    0      0
34   2.89     22    0      0.5 
  35   3.28     24    0      0.5 
  36   2.66     20    0      0
37   2.89     22    0      0.5 
38   3.28     24    0      0.5 
39   2.66     20    0      0
 40   2.89     22    0      0.5 
 41   2.89     14    1      0
 42   3.51     26    1      0
 43   3.54     24    1      1
 44   2.83     27    1      1
 45   3.39     17    1      1
 46   2.67     24    1      0
 47   3.65     21    1      1
 48   4.00     23    1      1
 49   3.10     21    1      0
 50   2.39     19    1      1



probit; lhs=grade; rhs=one,GPA ; keep=pred ;list$






More information about the Limdep mailing list