04/19/23 H.S. 104/19/23 H.S. 104/19/23 H.S. 1
Directed Acyclic GraphsDAGs
Hein Stigum
http://folk.uio.no/heins/
04/19/23 H.S. 204/19/23 H.S. 204/19/23 H.S. 2
Graphical Models
• Concepts– Confounder, Collider
– Conditional independence
– Undirected graphs, separation
• Directed Acyclic Graphs (DAGs)– Graphic tools: d-separation
– Examples
– Selection bias examples
04/19/23 H.S. 404/19/23 H.S. 404/19/23 H.S. 4
Confounder, Collider
– C is a common cause of E and D
– C is a common effect of E and D (bias if we condition on C)
04/19/23 H.S. 4
E D
C
E D
C
Confounder
Collider
Condition on: adjust stratify
Bias: Selection Information Confounding Confounder
Collider
Hernan et al, A structural approach to selection bias, Epidemiology 2004
04/19/23 H.S. 504/19/23 H.S. 5
Collider idea
• Conditioning on a collider induces an association between the causes
• Condition = (restrict, stratify, adjust)• Bias direction?
Hip arthritis
Limp
Knee injury
Two causes for limping
-
++
Hip arthritis
Limp
Knee injury
Select limping subjects
++
04/19/23 H.S. 604/19/23 H.S. 604/19/23 H.S. 6
Marginal and conditional dependence
AllE- 10 %E+ 14 %
DiseaseAll C- C+
E- 10 % 3 % 21 %E+ 14 % 3 % 21 %
Disease
E and D are:Marginallydependent
ConditionallyIndependent | C
04/19/23 H.S. 704/19/23 H.S. 704/19/23 H.S. 7
Undirected Graph, separation
1
2 3
4 5Are 1 and 5 separated by 2 ?Are 1 and 5 separated by 3 ?Are 1 and 5 separated by 3 and 4 ?
Yes
If 1 and 5 are separated by 2, then 1 and 5 are conditionally independent given 2
Definition: “1” and “5” are separated by “2” if all paths from “1” to “5” pass thru “2”
If 1 and 5 are separated by 2,path from 1 and 5 is blocked by 2
NoYes
04/19/23 H.S. 904/19/23 H.S. 904/19/23 H.S. 9
No bias
No E-D bias
if
E and D are conditionally independent under H0, given the variables we adjust for (C)
E D
C
E D
C
OK Not OK
Need graphic tools:“d-separation”
04/19/23 H.S. 1004/19/23 H.S. 1004/19/23 H.S. 10
D-separation
1
2 4
3 5
Are 1 and 4 separated by 2 ? No
Steps:1. Take ancestral graph of {1,2,4}2. Moralize the graph3. Look for separation
04/19/23 H.S. 1104/19/23 H.S. 1104/19/23 H.S. 11
D-separation, cont
1
2 4
3 5 Are 1 and 4 separated by 2 ? No
Take ancestral graph of {1,2,4}1
2 4
3
Moralize the graph
1
2 4
3
Are 1 and 4 separated by 2 ? No
04/19/23 H.S. 13
1. Ancestral graph of E,D,C2. Moralize3. Separated?
1. Ancestral graph of E,D2. Moralize3. Separated?
Vitamine example
Bias in E-D:
Evitamine
Dbirth defects
Cage
Uobesity
E ╨ Dno
Evitamine
Dbirth defects
Cage
Uobesity
Bias in E-D?Adjust for C?
Adjust for C :
E ╨ D|C yesE
vitamineD
birth defects
Cage
Uobesity
04/19/23 H.S. 14
Conditions giving confounding
Evitamine
Dbirth defects
Cage
Uobesity
Evitamine
Dbirth defects
Cage
Uobesity
Direct C-D effect?Path still blocked undirected graph!
Unmeasured U1 leads to age and vitamineNot logical (age), path still blocked!
Unmeasured U1 leads to obesity and vitamineNew path via U1 and U, Bias!
U1
U1
04/19/23 H.S. 16H.S.
HCB and SGA
SGA HCB
SBreast
SGA HCB
SBreast
Directed Acyclic Graph
Moralized undirected graph
Conclusion:Selection bias: HCB and SGA are not independent under selection.Adjusting for breastfeeding blocks the bias.
Breastfeeding leads to higher participationSGA leads to lower participationSelection bias?Adjust for breastfeeding?
04/19/23 H.S. 17H.S.
Conditions giving selection bias
SGA HCB
SBreastU1
SGA HCB
SBreast
HCB leads to higher participation?Unlikely!
U1
U2
U2
Unmeasured U1 leads to HCB and SNo new path in UDG!
Unmeasured U2 leads to SGA and SNew path via U1 and U2, Bias!
04/19/23 H.S. 18
Cohort: Differential loss to follow up
• Loss to follow up:Severe symptoms
Side effects of therapy
• Questions:Bias in the E-D effect?
Adjust for symptoms?
Etherapy
DAIDS
Sfollow up
Uimmuno sup
Vsympt
1. Take ancestral graph of {E,D,S}2. Moralize3. Separation by S?4. Separation by S,V?
No
Yes
Etherapy
DAIDS
Sfollow up
Uimmuno sup
Vsympt
04/19/23 H.S. 19
Self-selection bias
• Self-selection:Awareness of disease
Awareness of smoke effect
• Bias:Biased in the sample
May adjust for awareness
Esmoke
DCHD
SSelf selection
Ufamily hist
Vawareness
04/19/23 H.S. 20
Berkson’s bias
• Selection:Cases from hospital
Controls also from hospital
• Bias:Any cause of D2 will be
associated with D in the sample
Eexposure
Dcases
Shospital
D2controls
E D
S
not D
• Proper control selection:Controls sampled independent of
exposure
• Problem:E-D bias for linear models???
04/19/23 H.S. 21
Healthy worker effect
• Working:Good health (proven by test)
Exposed with symp. leave work
• Bias:Negative bias in the sample
Echemical
Dmortality
Sworking
Uhealth
Vtest
Echemical
Dmortality
Sworking
Uhealth
Vtest
+ -
-
++
biased true
Negative bias
0
04/19/23 H.S. 22
Exercise, Firefighters
• Show:No E-D bias in the pop. E ╨ D under H0
E-D bias in the sample. E ╨ D|S under H0
Adj for V does help. E ╨ D|S,V under H0
• Draw DAG:Study exercise on CHD among firefighters
High socioeconomic status have less CHD and less firefighters
Unmeasured personality have more exercise and more firefighters
04/19/23 H.S. 23
DAG
No E-D bias in the pop. E ╨ D under H0
E-D bias in the sample. E ╨ D|S under H0
Adj for V does help.
E ╨ D|S,V under H0
Eexercise
DCHD
Sfirefighter
Vsocio stat.
Upersonality
Eexercise
DCHD
Vsocio stat.
Upersonality
Eexercise
DCHD
Sfirefighter
Vsocio stat.
Upersonality
Eexercise
DCHD
Sfirefighter
Vsocio stat.
Upersonality
04/19/23 H.S. 24
Inverse probability weighting
• Idea:Each subject not lost should weigh
up for those lost (with the same E,V values)
• Method:In (E=0, V=1), 4 subject, 3 lost,
1 left: s=1/4, w=4
4 org. pop. 4 copies pseudo pop.
• ResultPseudo pop. measure is unbiased
given the DAG, (w|V,E)
More general than adjusting for V
Etherapy
DAIDS
Sfollow up
Uimmuno sup
Vsympt
04/19/23 H.S. 25
Exercise, AIDS
• Show:No E-D bias in the pop. E ╨ D
E-D bias in the sample. E ╨ D|S
Adj for V does not help. E ╨ D|S,V
Etherapy
DAIDS
Sfollow up
Uimmuno sup
Vsympt
Inverse probability weighting would still work here(w|V)