ii. Saturated model (n¼40 parameters)
logit PðXÞ¼o 1 Z 1 þo 2 Z 2 þo 3 Z 3
þþo 40 Z 40
Zi¼
1 if subjecti; i¼ 1 ; 2 ...; 40
0 otherwise
(
:
III. The Deviance Statistic (pages 312–317)
A. Formula: Devðb^Þ¼ 2 lnðL^c=L^maxÞ, where
b^¼ð^b 0 ;^b 1 ;^b 2 ;...;^bkÞ
L^c¼ML for current model
L^max¼ML for saturated model
B. Contrasts the likelihood of the current model
with the likelihood of the model that perfectly
predicts the observed outcomes
C. The closerL^candL^maxare to one another, the
better the fit (and the smaller the deviance
D. Common to test for GOF by comparing
deviance withw^2 np 1 value, butquestionably
legitimate
E. There are two alternative formulae for the
deviance:
i. DevETðb^Þ
¼ 2 ~
G
g¼ 1
dgln
dg
d^g
þðngdgÞln
ngdg
ngd^g
uses events–trials format, where
d^g¼ngP^ðXgÞ¼#of expected cases,
dg¼#of observed cases,
G¼#of covariate patterns
ii. DevSSðb^Þ
¼ 2 ~
n
i¼ 1
Yiln YY^i
i
þð 1 YiÞln^11 YY^i
i
h i
uses subject-specific format, where
Yi¼observed (0, 1) response for
subjecti
and Y^i¼predicted probability for
subjecti¼P^ðXiÞ
iii. DevSSðb^Þ 6 ¼DevETðb^ÞunlessG¼n
iv. Fully parameterized model:
DevETðb^Þ¼ 0 always but
DevSSðb^Þis never 0
330 9. Assessing Goodness of Fit for Logistic Regression