Logistic Regression: A Self-learning Text, Third Edition (Statistics in the Health Sciences)

(vip2019) #1

IV. The Hosmer–
Lemeshow (HL)
Statistic


 Alternative to questionable use
of deviance


 Available in most computer
packages


HL widely used regardless of
whetherG<<norGn:


 RequiresG> 3


 Rarely significant whenG< 6
 Works best whenGn(e.g.,
someXs are continuous)


 HL0 for fully parameterized
model


 “Saturated” model is fully
parameterized in ET format


Steps for computing HL statistic:



  1. ComputeP^ðXiÞfor allnsubjects

  2. OrderP^ðXiÞfrom largest to
    smallest values

  3. Divide ordered values intoQ
    percentile groupings (usually
    Q¼ 10 )deciles of risk)

  4. Form table of observed and
    expected counts

  5. Calculate HL statistic from table

  6. Compare computed HL to
    w^2 withQ2df


Step 1: ComputeP^ðXiÞ;i¼ 1 ; 2 ;...;n
n¼ 200 ) 200 values forP^ðXiÞ
although some values are identi-
cal ifXiXjfor subjectsiandj.


Step 2: Order values ofP^ðXiÞ:
e.g.,n¼ 200
Order # P^ðXiÞ
1 0.934 (largest)
2 0.901 tie
3 0.901
... ...
199 0.123
200 0.045 (smallest)


Toavoid questionable useofthe deviance to pro-
vide a significance test for assessing GOF, the
Hosmer–Lemeshow (HL) statistic has been deve-
loped and is available in most computer packages.

The HL statistic is widely used regardless of
whetherornotthenumberofcovariatepatterns
(G) is close to the number of observations. Nev-
ertheless, this statistic requires that the model
considers at least three covariate patterns, rarely
results in significance whenGis less than 6, and
works best whenGis close ton(the latter occurs
when some of the predictors are continuous).

Moreover, the HL statistic has the property
that it will always be zero for a fully parame-
terized model. In other words, the “saturated”
model for the HL statistic is essentially a fully
parameterized (group-saturated) model coded
in events–trials format.

The steps involved in computing the HL statis-
tic are summarized at the left. Each step will
then be described and illustrated below, fol-
lowing which we will show examples obtained
from different models with differing numbers
of covariate patterns.

At the first step, wecompute the predicted risks
P^ðXiÞfor all subjectsin the dataset. If there are,
say,n¼200 subjects, there will be 200 pre-
dicted risks, although some predicted risks
will be identical for those subjects with the
same covariate pattern.

At the second step, weorder the predicted risks
from largest to smallest (or smallest to largest).

Again, there may be several ties when doing
this if some subjects have the same covariate
pattern.

o


318 9. Assessing Goodness of Fit for Logistic Regression

Free download pdf