Processing math: 100%

Hosmer-Lemeshow Chi-Squared Test

The Hosmer-Lemeshow χ2 value is calculated by grouping the observation into g groups based percentiles of the predicted probabilities,

HL=gj=1(Ojnjˉπj)2njˉπj(1ˉπj)

where nj is the number of observations, Oj is the number of observed successes, and ˉπj is the the estimated success probability in the jth Hosmer-Lemeshow group.

The number of Hosmer-Lemeshow percentile groups g is typically 10 (deciles) but can be lower if the there are fewer replicate groups or greater than 10 parameters p in the model. The quantiles are computed using the method recommended by Hyndman and Fan in their 1996 paper (see Bibliography below).

The degrees of freedom for the test is the number of Hosmer-Lemeshow groups minus 2, df=g2.

There is evidence of poor fit if HL/(gp) differs significantly from 1 or the p-value is less than the α-risk.

Use the Hosmer-Lemeshow test when the design contains no replicates or when there are replicate groups with few replicates.

References

  • David W. Hosmer and Stanley Lemeshow. Applied Logistic Regression. Wiley, New York, second edition, 2000.

  • Rob J. Hyndman and Yanan Fan. Quantiles in statistical packages. The American Statistician, 50(4):361–365, 1996.

  • Douglas C. Montgomery, Peck, Elizabeth A., and G. Geoffrey Vining. Introduction to Linear Regression Analysis. Wiley, 5th edition, 2012.