In general
qvariables 6 ¼k1 dummy
variables
This formula is the same as that for a single
exposure variable with several categories,
except that here we haveqvariables, whereas
previously we hadk1 dummy variables.
As an example consider the three exposure
variables defined above – SMK, PAL, and
SBP. The control variables are AGE and SEX,
which are defined in the model asVterms.
Suppose we wish to compare a nonsmoker
who has a PAL score of 25 and systolic blood
pressure of 160 to a smoker who has a PAL
score of 10 and systolic blood pressure of
120, controlling for AGE and SEX. Then,
here,E*is defined by SMK*¼0, PAL*¼25,
and SBP*¼160, whereas E** is defined by
SMK**¼1, PAL**¼10, and SBP**¼120.
The control variables AGE and SEX are con-
sidered fixed but do not need to be specified to
obtain an odds ratio because the model con-
tains no interaction terms.
The odds ratio is then computed as e to
the quantity (SMK*SMK**) timesb 1 plus
(PAL*PAL**) timesb 2 plus (SBP*SBP**)
timesb 3 ,
which equals e to (01) times b 1 plus
(2510) timesb 2 plus (160120) timesb 3 ,
which equals e to the quantity1 timesb 1
plus 15 timesb 2 plus 40 timesb 3 ,
which reduces to e to the quantityb 1 plus
15 b 2 plus 40b 3.
An estimate of this odds ratio can then be
obtained by fitting the model and replacing
b 1 ,b 2 , andb 3 by their corresponding estimates
^b 1 ;^b 2 , andb^ 3. Thus,ROR equals e to the quan-d
tityb^ 1 plus 15 ^b 2 plus 40 b^ 3.
EXAMPLE
logit PðXÞ¼aþb 1 SMKþb 2 PAL
þb 3 SBP
þg 1 AGEþg 2 SEX
Nonsmoker, PAL¼25, SBP¼ 160
vs.
Smoker, PAL¼10, SBP¼ 120
E*¼(SMK*¼0, PAL*¼25, SBP*¼160)
E**¼(SMK**¼1, PAL**¼10,
SBP**¼120)
AGE and SEX fixed, but unspecified
RORE*vs:E**¼expðSMK*SMK**Þb 1
þðPAL*PAL**Þb 2
þðSBP*SBP**Þb 3
¼exp½ð 0 1 Þb 1 þð 25 10 Þb 2
þð 160 120 Þb 3
¼exp½ð 1 Þb 1 þð 15 Þb 2
þð 40 Þb 3
¼expðb 1 þ 15 b 2 þ 40 b 3 Þ
RORd ¼exp^b 1 þ 15 b^ 2 þ 40 b^ 3
86 3. Computing the Odds Ratio in Logistic Regression