EXAMPLE
Edited Output (Model EC4):
(Variables – CAT, AGE, ECG, SMK, CHL, HPT
CAT×CHL, and CAT× HPT)
7.9914 8 0.4343
347.2295 590 1.0000
799.0580 590 <.0001
- 2 Log L 347.230
No evidence
Model EC4
has lack of fit
1 61 2 0.94 59 60.06
2 61 1 1.96 60 59.04
3 61 2 2.68 59 58.32
4 61 5 3.37 56 57.63
5 61 4 4.07 57 56.93
6 61 2 4.78 59 56.22
7 61 4 5.77 57 55.23
8 61 12 7.66 49 53.34
9 61 10 11.05 51 49.95
10 60 29 28.71 31 31.29
Deviance statistic (347.2295)
very different from
Pearson statistic (799.0580)
Both Models EC3 and EC4
do not have lack of fit:
Use LR test to compare Models EC3
vs. EC4
H 0 :d 1 ¼d 2 ¼0 in Model EC4
LR¼ 2 lnL^EC 3 ð 2 lnL^EC 4 Þ
w^22 dfunderH 0
Model EC3 Model EC4
2 LogL 400.394 347.230
LR¼400.394347.230¼53.165
(P< 0.001):
Model EC4 preferred over Model
EC3
Edited output for the interaction model EC4 is
now shown here at the left. This model con-
tains CAT, AGE, ECG, SMK, CHL, and HPT,
and the product terms CATCHL and CAT
HPT in addition to the six main effects.
From this output, as with Model EC3, we see
that the predicted risks have been divided
into (Q¼10) deciles, with about 61 subjects
in each decile. Also, the observed and expected
cases are somewhat different within each dec-
ile, and the observed and expected noncases
are somewhat different.
The HL statistic of 7.9914 has Q 2 ¼ 8
degrees of freedom and is nonsignificant
(P¼0.4343). Thus, there is not sufficient evi-
dence from this test to conclude that interac-
tion Model EC4 has lack of fit (as concluded for
Model EC3).
As with Model EC3, both the Deviance
(347.2295) and Pearson (799.0580) statistics
for Model EC4 are very different from each
other as well as from the HL statistic (7.9914).
Although we can conclude from the HL test
that both Models EC3 and EC4 do not indicate
lack of fit, we can decide between these two
models by performing an LR test that com-
pares corresponding log likelihood statistics
for the two models.
The null hypothesis is that the coefficients of
the two product terms in Model EC4 are both
zero. As previously seen in Chap. 7, the test
statistic is approximately chi square with
2 degrees of freedom under the null hypothesis.
The resulting LR value is 53.164, which is
highly significant (P<0.0001).
Consequently, the interaction Model EC4 is
preferred to the no-interaction Model EC3.
Presentation: V. Examples of the HL Statistic 325