Professional Documents
Culture Documents
Session 11 (Logistic Models) PDF
Session 11 (Logistic Models) PDF
URBN LOFTS
URBN LOFTS
For simplicity, we consider a single factor X, with I
categories.
= +
The higher is, the higher the value of .
As in ANOVA, the factor has as many parameters { } as
categories. Unless we delete from the model, one is
URBN LOFTS
redundant.
1837 LOFT STREET, ANYTOWN, NY 50080
URBN LOFTS
An equivalent expression of model (5.4) uses indicator variables. Let
x = 1 for observations in row i and x = 0 otherwise, i = 1,...,I-1.
The model is
URBN LOFTS
1837 LOFT STREET, ANYTOWN, NY 50080
URBN LOFTS
The value or for a single category is irrelevant.
Different constraint systems result in different values.
URBN LOFTS
For model (5.4), we treat malformation status as the
response and alcohol consumption as an explanatory
factor. Regardless of the constraint for { }, the model is
saturated and + } are the sample logits, reported in
Table 5.3. For instance,
For the coding that constrains 5 = 0, = 3.61 and 1 =
2.26. For the coding 1 = 0, = 5.87. Table 5.3 shows
that except for the slight reversal between the first and
second categories of alcohol consumption, the sample
logits and hence the sample proportions of malformation
cases increase as alcohol consumption increases.
URBN LOFTS
1837 LOFT STREET, ANYTOWN, NY 50080
URBN LOFTS
URBN LOFTS
1837 LOFT STREET, ANYTOWN, NY 50080
URBN LOFTS
URBN LOFTS
1837 LOFT STREET, ANYTOWN, NY 50080
URBN LOFTS
URBN LOFTS
1837 LOFT STREET, ANYTOWN, NY 50080
URBN LOFTS
URBN LOFTS
1837 LOFT STREET, ANYTOWN, NY 50080
URBN LOFTS
URBN LOFTS
URBN LOFTS
URBN LOFTS
1837 LOFT STREET, ANYTOWN, NY 50080
URBN LOFTS
When all variables are categorical, a multiway contingency table
displays the data. We illustrate ideas with binary predictors X and Z.
We treat the sample size at given combinations of X and Z as fixed and
regard the two counts on Y at each setting as binomial, with different
binomials treated as independent. We let indicator variables x and z
take value 1 in the first category and 0 in the second. The model
URBN LOFTS
1837 LOFT STREET, ANYTOWN, NY 50080
URBN LOFTS
At a fixed level of Z, the effect on the logit of changing categories of X is
This logit difference equals the difference of log odds, which is the log
odds ratio between X and Y, fixing Z.
exp(1 ) is the conditional odds ratio between X and Y. Adjusting for Z,
the odds of success when x=1 is equal to exp(1 ) times the odds when
x=0.
This conditional odds ratio is the same at each level of z (there is
homogeneous XY association).
The lack of an interaction term implies a common odds ratio for the
partial tables.
When 1 = 0, means that common odds ratio equals 1, then X and Y are
independent in each partial table,
or conditionally independent, given
URBN LOFTS
1837 LOFT STREET, ANYTOWN, NY 50080
Z.
URBN LOFTS
A factor with I categories needs I-1 indicator variables with I categories
for X and K categories for Z, the model from 5.10 extends to
URBN LOFTS
1837 LOFT STREET, ANYTOWN, NY 50080
URBN LOFTS
alternative representation of such factors resembles the way that
ANOVA factorial models often express them The equivalent model
formula is
URBN LOFTS
1837 LOFT STREET, ANYTOWN, NY 50080
URBN LOFTS
Table 5.6 is from a study on
the effects of AZT in slowing the
development of AIDS symptoms.
In the study, 338 veterans whose
immune systems were beginning
to falter after infection with HIV
were randomly assigned either
to receive AZT immediately or to
wait until their T cells showed
severe immune weakness. Table
5.6 cross-classifies the veterans'
race, whether they received AZT
immediately, and whether they
developed AIDS symptoms during
the 3-year study.
URBN LOFTS
1837 LOFT STREET, ANYTOWN, NY 50080
URBN LOFTS
URBN LOFTS
1837 LOFT STREET, ANYTOWN, NY 50080
URBN LOFTS
URBN LOFTS
1837 LOFT STREET, ANYTOWN, NY 50080
URBN LOFTS
For the models fit, white veterans with immediate AZT use had estimated probability
0.150 of developing AIDS symptoms during the study. Since 107 white veterans took AZT,
the fitted value is 107(0.150) = 16.0 for developing symptoms and 107(0.850) = 91.0 for
not developing them.
The goodness-of-fit statistics comparing these with the cell counts are 2 = 1.38 and
2 = 1.39. The model has four binomials, one at each combination of AZT use and race.
The residual df = 4 3 = 1. The small 2 and 2 values suggest that the model fits
decently (P > 0.2).
The odds ratio between X and Y is the same at each level of Z. The goodness-of-fit test
checks this structure. That is, the test also provides a test of homogeneous odds ratios.
For Table 5.6, homogeneity is plausible. Since residual df = 1, the more complex model
that adds an interaction term and permits the two odds ratios to differ is saturated.
URBN LOFTS
1837 LOFT STREET, ANYTOWN, NY 50080
URBN LOFTS
URBN LOFTS
1837 LOFT STREET, ANYTOWN, NY 50080
URBN LOFTS
Table 5.9 shows the ML parameter
estimates.
for dark crabs, logit[P(Y = 1) = 12.715 +
0.468x
for medium-light crabs, 1 = 1, and
logit[P(Y = 1)] = (-12.715 + 1.330) + 0.468x
= -11.385 + 0.468x.
At the average width of 26.3 cm, P(Y = 1)
= 0.399 for dark crabs and 0.715 for
medium-light crabs.
The difference for medium-light crabs and
dark crabs equals 1.330. At any given
width, the estimated odds that a mediumlight crab has a satellite are exp(1.330) =
3.8 times the estimated odds for a dark
crab.
At width x = 26.3, the odds equal
0.715/0.285 = 2.51 for a medium-light
crab and 0.399/0.601 = 0.66 for a dark
crab, for which 2.51/0.66 = 3.8.
URBN LOFTS
1837 LOFT STREET, ANYTOWN, NY 50080
URBN LOFTS
URBN LOFTS
1837 LOFT STREET, ANYTOWN, NY 50080
URBN LOFTS
URBN LOFTS