Professional Documents
Culture Documents
Confounding and Effect Modification
Confounding and Effect Modification
Effect Modification
12/12/2022 1
Content
12/12/2022 2
Measures of association in statistics
Odds ratio
12/12/2022 3
Risk difference (attributable risk)
• The risk difference (RD) or attributable risk is the difference
between the risk of an outcome in the exposed group and the
unexposed group.
12/12/2022 4
Example
A randomized, double-blinded, placebo controlled trial of the efficacy and
safety of zidovudine (AZT) in reducing the risk of maternal-infant HIV
transmission. 363 HIV infected pregnant women were randomized to AZT
or placebo.
Results
Of the 180 women randomized to AZT group, 13 gave birth to children
who tested positive for HIV within 18 months of birth.
Of the 183 women randomized to the placebo group, 40 gave birth to
children who tested positive for HIV within 18 months of birth.
Note: A double-blind study is one in which neither the participants nor the
experimenters know who is receiving a particular treatment.
12/12/2022 5
Risk difference HIV
Transmission
Drug group Total
AZT Placebo
Yes 13 40 53
No 167 143 310
Total 180 183 363
The risk of HIV transmission with AZT is about 1/3 the risk of HIV
transmission with placebo.
Interpretation: An HIV positive pregnant woman could reduce her
personal risk of giving birth to an HIV positive child by nearly 70% if
she takes AZT during her pregnancy.
12/12/2022 7
Relative risk (or Risk ratio)
RR could be computed in the other direction as well
12/12/2022 8
Risk difference vs. Relative risk
12/12/2022 9
What is an Odds?
Odds is the ratio of the risk of having an outcome to the risk
of not having an outcome.
If p represents the risk of an outcome, then the odds are given by:
12/12/2022 10
What is an Odds?
The estimated risk of giving birth to an HIV infected child among
mothers treated with AZT is 𝑝Ƹ 1= 0.07
The corresponding odds estimate is
12/12/2022 11
Odds Ratio
The estimated odds ratio of an HIV birth with AZT relative to placebo
The odds of HIV transmission with AZT is 0.28 (about 1/3) the odds
of transmission with placebo.
Interpretation: AZT is associated with an estimated 72% (estimated
OR = 0.28) reduction in odds of giving birth to an HIV infected child
among HIV infected pregnant women.
12/12/2022 12
Summary
An example of 2*2 cross table showing formulas of risk
difference, risk ratio, and odds ratio
12/12/2022 13
Confounding
Consider results from the following (fictitious) study:
• This study was done to investigate the association between
smoking and a certain disease in male and female adults.
• 210 smokers and 240 non-smokers were recruited for the study.
Source: John McGready. Statistical Reasoning II. Confounding and Effect Modification
Lecture. Johns Hopkins Bloomberg School of Public Health
12/12/2022 14
Confounding
Smoke, Disease variables: 0 = No, 1 = Yes
Regression equation?
What’s the probability of having the disease for a
Smoker
Non-smoker
Conclusion?
12/12/2022 16
Confounding
12/12/2022 18
Confounder
Let’s find out whether sex is related to both smoking and disease
12/12/2022 19
Confounder
• Is smoking related to disease in males?
12/12/2022 20
Confounder
• Is smoking related to disease in females?
12/12/2022 21
Confounder
• A recap of the study (Smoking, Disease, and Sex)
- The overall (sometimes called crude, unadjusted) relationship
(RR) between smoking and disease was nearly one (risk
difference nearly 0).
12/12/2022 22
Confounder
Sex and disease
12/12/2022 24
Confounding (Lurking Variable)
• A confounder Z is a variable that distorts the true relationship between
8
X and Y.
This can happen if Z is related to both X and Y
12/12/2022 26
How to Adjust for Confounding?
• Controlling for confounding by stratification
- Look at tables separately
- For example, male and females, clinic
- Take weighted average of stratum specific estimates
• For example, in the disease/smoking situation
- To get a sex adjusted relative risk for the smoking disease relationship, we
could weight the sex-specific relative risks by numbers of males and female.
12/12/2022 27
How to Adjust for Confounding?
12/12/2022 28
How to Adjust for Confounding?
• Regression method: add the confounder variable as an
independent variable.
• What is the model now?
12/12/2022 29
How to Adjust for Confounding?
Compare the model with and without the confounder:
12/12/2022 30
How to Adjust for Confounding?
When sex is included in the model, the effect of smoking is in
the opposite direction – smoking is a risk factor of the disease
and the effect is statistically significant.
12/12/2022 31
How to Adjust for Confounding?
Compare the nested models
Extended model:
Chi-square test:
Chi-square value is larger than the critical chi-square value. It means that p-
value is smaller than the critical p value (0.05)
Reject H0 [H0: coefficient(s) of the added variable(s) =0, or the added
variable(s) does not significantly improve the model]
The extended model is significantly better than the null model
12/12/2022 33
Effect modification/Statistical Interaction
12/12/2022 34
Effect modification
• Effect modification (statistical interaction) occurs when the
relationship between an outcome and predictor one is different
depending on the level of predictor two.
• Examples
12/12/2022 35
Effect modification
The effect of smoking on disease for male:
12/12/2022 37
Test of Interaction (effect modification)
• Let’s look at the result:
12/12/2022 38
Test of Interaction (effect modification)
• Regression equation
12/12/2022 39
Interpret the coefficients
12/12/2022 40
Test of Interaction (effect modification)
12/12/2022 41
Test of Interaction (effect modification)
12/12/2022 42
Test of Interaction (effect modification)
Compare the nested models
12/12/2022 43
Test of Interaction (effect modification)
• The -2LL statistic (often called the deviance) is an indicator of how much
unexplained information there is after the model has been fitted, with large
values of -2LL indicating poorly fitting models.
- If our new model explains the data better than the baseline model, there
should be a significant reduction in the deviance (-2LL) which can be
tested against the chi-square distribution to give a p value.
12/12/2022 44
Test of Interaction (effect modification)
• Chi-square test:
2 = 490.798 – 490.797 = 0.001 < 2 = 0.05, df = 1 = 3.84
12/12/2022 45