This work is licensed under a . Your use of this

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike License. Your use of this
material constitutes acceptance of that license and the conditions of use of materials on this site.
Copyright 2009, The Johns Hopkins University and John McGready. All rights reserved. Use of these materials
permitted only in accordance with license rights granted. Materials provided “AS IS”; no representations or
warranties provided. User assumes all responsibility for use, and all liability related thereto, and must independently
review all materials for accuracy and efficacy. May contain materials owned by others. User is responsible for
obtaining permissions for use from third parties as needed.
Section C
More Examples of Simple Logistic Regression
Example: Breast Feeding Status and Age
 
Data on a random sample of 236 Nepali children < three years old
(birth to three years)
 
Information includes breast feeding status at time of study (1 = yes,
0 = no) and age of the child in months
 
We want to use logistic regression to estimate an association
between breast feeding probability and a child’s age: with the data,
we will estimate a model
 
p is the estimated probability of breast feeding (proportion of
children who are breast fed); x1 is age of child
3
Example: Breast Feeding Status and Age
 
Results from logistic regression using Stata
 
So here, the estimated slope of age
is negative, indicating a
negative association between breast feeding and age of child in this
sample
 
Recall,
is the estimated ln odds ratio of breast feeding
for a one month difference in age; so the estimated odds ratio is
4
Example: Breast Feeding Status and Age
 
So the odds ratio estimate is 0.78: the odds ratio of being breast fed
for two groups of children who differ by one month in age is 0.78,
older to younger
-  In other words, the older children (by one month) have 22%
lower odds of being breast fed when compared to younger
children
 
This estimate is for any two groups who differ by one month in age
in our sample with age range 0-36 months
-  35 months old to 34 months old
-  10 months old to 9 months old
-  17 months old to 16 months old
5
Example: Breast Feeding Status and Age
 
Question: based on these results, what is the estimated odds ratio
of being breast fed for children who are 24 months old compared to
children who are 18 months old?
 
How to get this? To motivate, start by writing out what equations
would be for both groups:
 
Taking the difference:
6
Example: Breast Feeding Status and Age
 
So again, by famous property of logarithms:
 
Recall, the estimated odds ratio of being breast fed for a one-month
difference in age was 0.78; Notice also that:
 
Why is this?
7
Example: Breast Feeding Status and Sex of Child
 
We can also use dichotomous xs in logistic regression
 
For the same sample of Nepali children < 36 months old, suppose we
want to estimate association between breast feeding status and sex
of the child: Suppose we use the following model:
 
p is the estimated probability of breast feeding (proportion of
children who are breast fed); x1 is the sex of a child (1 = female, 0 =
male)
8
Example: Breast Feeding Status and the Sex of Child
 
Results from logistic regression using Stata
 
Here,
is the estimated ln odds ratio of breast feeding for a
one unit difference in sex—but the only possible one unit difference
is “1s” to “0s”—so
is the estimated ln odds ratio of breast feeding
for female children compared to male children
 
The corresponding odds ratio estimate is
; in
this sample female and male children have very similar odds (and
hence probability) of being breast fed
9
Death in the ICU: Patients with Sepsis
 
Sample of 106 patients admitted to the ICU at a large U.S. hospital
(Pine. et al.)
 
All patients in sample had sepsis (blood infection) at time of
admission to ICU; information also on whether patient died while in
ICU, patient’s age at admission (range 17-94 years), and whether
patient was in shock at time of admission
 
Once again, using age as our x, let’s use logistic regression to relate
death to patient age
10
Death in the ICU: Patients with Sepsis
 
Results from logistic regression using Stata
 
Here,
is the estimated ln odds ratio of death in the ICU
for a one year difference in age; so
is the estimated ln odds ratio
of death in the ICU for two groups of patients who differ by one
year in age, older to younger
 
The corresponding odds ratio estimate is
; in
this sample a one year difference in age is associated with a 5%
higher odds of death, older to younger; the older patients have 1.05
times the odds of death compared to the younger patients
11
Death in the ICU: Patients with Sepsis
 
We could also use logistic regression to estimate the association
between death and whether the patient was in shock at the time of
admission to ICU (9% of the sample was in shock)
 
Here,
is the estimate ln odds ratio of death for a one unit
difference in shock; but the only possible one unit difference is “1”s
compared to “0”s, i.e., those in shock versus those not in shock: so
is the estimated ln odds ratio of death for those in shock compared
to those not in shock
 
The corresponding odds ratio estimate is
;
12