Download presentation
Presentation is loading. Please wait.
Published byGabriella Conley Modified over 6 years ago
1
DAGs intro, Epidemiology 8h DAG=Directed Acyclic Graph
MF 9570: Causal Inference: Monday : Introduction to causal graphs (DAGs) h : Lunch break : Causal graphs (DAGs) continued. 3 h Tuesday : Analyzing DAGs h : DAGitty h Sum without DAGitty =6.75 h Included If time Not included 1. day: Concepts, Causal thinking, Paths, Analyzing, Drawing, Meth to remove conf. IPW, Outcome versus exposure models Mendelian 2. day: Selection bias strategies, DAGs and prop Limitations, Problems and extensions Norsk beskrivelse: Introduksjon til kausale grafer (DAGs) Kausale grafer (Directed Acyclic Graphs) er nyttige verktøy for å forstå grunnleggende begreper som konfundering, mediering og seleksjonsfeil. Grafene kan finne variable som må justeres for, og variable som ikke bør justeres for. Og grafene er en presis beskrivelse av antagelsene i analysen. Kurset vil gi en introduksjon til kausale grafer med mye eksempler og lite formalisme. Velkommen under mottoet «Draw your assumptions before your conclusions» Engelsk beskrivelse: The causal graphs are useful tools to understand key concepts like confounding, mediation and colliding (selection bias). They help in the analysis by finding a group of variables that must be adjusted for (and variables that should not be adjusted for). And they give a clear statement of prior assumptions for the analysis. Hein Stigum courses Dec-18 Dec-18 Dec-18 Dec-18 Dec-18 Dec-18 H.S. H.S. H.S. H.S. H.S. 1 1 1 1 1
2
Agenda DAG concepts Analyzing DAGs DAGs and stat/epi phenomena
Causal thinking, Paths Analyzing DAGs Examples DAGs and stat/epi phenomena Selection bias Mediation Time dependent confounding Effects of adjustments Drawing DAGs Limitations, problems Exercises DAG concepts Define a few main concepts Paths: Surprisingly few rules needed Analyzing DAGs Examples: conf, intermediate, collider Selection bias, Information bias Rand, Mend Rand The two former: manual for use More on DAGs Deeper thoughts and problems With exercises, difficult to guess time Dec-18 Dec-18 Dec-18 Dec-18 Dec-18 Dec-18 H.S. H.S. H.S. H.S. H.S. 2 2 2 2 2
3
Background Potential outcomes: Neyman, 1923
Causal path diagrams: Wright, 1920 Causal DAGs: Pearl, 2000 Potential outcomes or counterfactual outcomes Jerzy Neyman (April 16, 1894 – August 5, 1981), born Jerzy Spława-Neyman, was a Polish mathematician and statistician who spent the first part of his professional career in various institutions in Warsaw, Poland, and the second part at the University of California, Berkeley. Neyman first introduced the modern concept of a confidence interval into statistical hypothesis testing[2] and co-devised null hypothesis testing (in collaboration with Egon Pearson). Sewall Green Wright (December 16, 1889 – March 3, 1988) was an American geneticist known for his influential work on evolutionary theory and also for his work on path analysis. Judea Pearl (born 1936) is an Israeli-born American computer scientist and philosopher, best known for championing the probabilistic approach to artificial intelligence and the development of Bayesian networks (see the article on belief propagation). He is also credited for developing a theory of causal and counterfactual inference based on structural models (see article on causality) Dec-18 H.S.
4
Regression purpose Prediction models Estimation models
Predict the outcome from the covariates Ex: Air pollution from distance to roads Estimation models Estimate effect of exposure on outcome Ex: Smokers have RR=20 for lung cancer DAGs are of no interrest DAGs are important Dec-18 H.S.
5
Why causal graphs? Estimate effect of exposure on disease Problem
Association measures are biased Causal graphs help: Understanding Confounding, mediation, selection bias Analysis Adjust or not Discussion Precise statement of prior assumptions Dec-18 H.S.
6
CONCEPTS Causal versus casual
(Rothman et al. 2008; Veieroed et al. 2012 Dec-18 H.S.
7
DAG=Directed Acyclic Graph
god-DAG Causal Graph: Node = variable Arrow = cause E=exposure, D=disease DAG=Directed Acyclic Graph Read of the DAG: Causality = arrow Association = path Independency = no path Estimations: E-D association has two parts: ED causal effect keep open ECUD bias try to close Arrows=lead to or causes Time E- exposure D- disease C, V - cofactor, variable U- unmeasured Directed= arrows Acyclic = nothing can cause itself Conditioning (Adjusting): E[C]UD Time Dec-18 Dec-18 Dec-18 Dec-18 H.S. H.S. H.S. 7 7 7
8
Association and Cause Association 3 possible causal structure E D
(reverse cause) E D Assume E precedes D in time Association: observe Cause: infer (extra knowledge) Causal structure force on the data Basic structures, may generalize with many more variables: use paths + more complicated structures Dec-18 Dec-18 Dec-18 H.S. H.S. H.S. 8 8 8
9
Confounder idea + A common cause Adjust for smoking Smoking
Yellow fingers Smoking Lung cancer + + + Yellow fingers Lung cancer + A confounder induces an association between its effects Conditioning on a confounder removes the association Condition = (restrict, stratify, adjust) Paths Simplest form Causal confounding, (exception: see outcome dependent selection) “+” (assume monotonic effects) Dec-18 Dec-18 Dec-18 Dec-18 Dec-18 H.S. H.S. H.S. H.S. 9 9 9 9 9
10
Two causes for selection to study
Collider idea Two causes for selection to study Selected subjects Selected Yellow fingers Selected Lung cancer + + + Yellow fingers Lung cancer or + and Conditioning on a collider induces an association between its causes “And” and “or” selection leads to different bias Paths Simplest form “+” (assume monotonic effects) Dec-18 Dec-18 Dec-18 Dec-18 Dec-18 H.S. H.S. H.S. H.S. 10 10 10 10 10
11
Mediator Have found a cause (E) How does it work? Mediator (M) M E D
indirect effect How does it work? Mediator (M) Paths E direct effect D 𝑇𝑜𝑡𝑎𝑙 𝑒𝑓𝑓𝑒𝑐𝑡=𝑖𝑛𝑑𝑖𝑟𝑒𝑐𝑡+𝑑𝑖𝑟𝑒𝑐𝑡 𝑀𝑒𝑑𝑖𝑎𝑡𝑒𝑑 𝑝𝑟𝑜𝑝𝑜𝑟𝑡𝑖𝑜𝑛= 𝑖𝑛𝑑𝑖𝑟𝑒𝑐𝑡 𝑡𝑜𝑡𝑎𝑙 Use ordinary regression methods if: no E-M interaction and collapsible effect measures Otherwise, need new methods Dec-18 H.S.
12
Concepts: Summing up E D M E D C E D K E D
Associations visible in data. Causal structure from outside the data. DAG: no arrow means independence E D Cause M Cause with Mediator E D C Cause with Confounder E D K Cause with Collider E D Dec-18 H.S.
13
Causal thinking in analyses
Dec-18 H.S.
14
Aims in papers Standard aim (in introduction) Problems Solution
“We what to estimate the association between E and D” Problems Imprecise many E-D association Why adjust gives no rationale for adjusting Solution Be bold: “We what to estimate the effect of E on D” Or more realistic: “We what to estimate the association closest to the effect of E on D ” Dec-18 H.S.
15
Regression before DAGs
Risk factors for D: Use statistical criteria for variable selection Variable OR Comments E 2.0 C 1.2 Surprisingly low association Report all variables in the model as equals Association Both can be misleading! C E D Dec-18 H.S.
16
Statistical criteria for variable selection
- Want the effect of E on D (E precedes D) - Observe the two associations C-E and C-D - Assume statistical criteria dictates adjusting for C (likelihood ratio, Akaike (赤池 弘次) or 10% change in estimate) C E D The undirected graph above is compatible with three DAGs: C C C E D E D E D Confounder 1. Adjust Mediator 2. Direct: adjust 3. Total: not adjust Collider 4. Not adjust Hirotugu Akaike 赤池 弘次 Conclusion: The data driven method is correct in 2 out of 4 situations Need information from outside the data to do a proper analysis DAGs variable selection: close all non-causal paths Dec-18 H.S.
17
Reporting variable as equals: Association versus causation
Risk factors for D: Use statistical criteria for variable selection Variable OR Comments E 2.0 C 1.2 Surprisingly low association Report all variables in the model as equals Association Causation Base adjustments on a DAG C C Report only the E-effect or use different models for each variable E D E D Symmetrical Directional C is a confounder for E-D C is a confounder for ED E is a confounder for C-D E is a mediator for CD Westreich & Greenland 2013 Dec-18 H.S.
18
Exercise: report variables as equals?
Risk factors for Fractures Interpret as effect of: Variable OR Comments (surprises) Diabetes 2 2.0 Physical activity 1.2 Protective in other studies? Obesity 1.0 No effect? Bone density 0.8 Diabetes adjusted for all other vars. Phy. act. adjusted for all other vars. Obesity adjusted for all other vars. Bone d. adjusted for all other vars. physical activity P P is a confounder for E→D, but is E a confounder for P→D? Which effects are reported correctly in the table? diabetes 2 E fractures D obesity O bone density B 5 min Dec-18 H.S.
19
Causal thinking: Summing up
Make a clear aim Data driven analyses do not work Need causal information from outside the data. (Data driven prediction models OK though). Reporting table of adjusted associations is misleading. Simpson’s paradox: causal information resolves the paradox. Dec-18 Dec-18 Dec-18 H.S. H.S. H.S. 19 19
20
Paths The Path of the Righteous Dec-18 Dec-18 Dec-18 H.S. H.S. H.S. 20
Ezekiel 25:17. "The Path of the Righteous Man Is Beset on All Sides by The inequities of the Selfish and the Tyranny of Evil Men." (Pulp Fiction version) Paths Dec-18 Dec-18 Dec-18 H.S. H.S. H.S. 20 20
21
Path definitions Path: any trail from E to D (without repeating itself) Type: causal, non-causal State: open, closed Path 1 E®D 2 E®M®D 3 E¬C®D 4 E®K¬D Four paths: Notice: path with or against the arrows Paths show potential association Goal: Keep causal paths of interest open Close all non-causal paths Dec-18 Dec-18 H.S. H.S. 21
22
Four rules 1. Causal path: ED 2. Closed path: K
(all arrows in the same direction) otherwise non-causal Before conditioning: 2. Closed path: K (closed at a collider, otherwise open) Conditioning on: 3. a non-collider closes: [M] or [C] 4. a collider opens: [K] (or a descendant of a collider) Dec-18 H.S.
23
ANALYZING DAGs Dec-18 H.S.
24
Confounding examples Dec-18 Dec-18 Dec-18 Dec-18 Dec-18 Dec-18 H.S.
Informal, no strict notation/def Casual about the causal! Confounding examples Dec-18 Dec-18 Dec-18 Dec-18 Dec-18 Dec-18 H.S. H.S. H.S. H.S. H.S. 24 24 24 24 24 24
25
Vitamin and birth defects
Is there a bias in the crude E-D effect? Should we adjust for C? What happens if age also has a direct effect on D? Unconditional Path Type Status 1 E®D Causal Open 2 E¬C®U®D Non-causal Bias This is an example of confounding Noncausal open=biasing path Both C and U are confounders Problem that we have ”forgotten” arrow C->D? Conditioning on C Path Type Status 1 E®D Causal Open 2 E¬[C]®U®D Non-causal Closed Question: Is U a confounder? No bias 3 E¬[C] ®D Non-causal Closed Dec-18 Dec-18 Dec-18 Dec-18 H.S. H.S. H.S. 25 25 25
26
Exercise: Physical activity and Coronary Heart Disease (CHD)
We want the total effect of Physical Activity on CHD. Write down the paths. Are they causal/non-causal, open/closed? What should we adjust for? Noncausal open=biasing path 5 minutes Dec-18 Dec-18 Dec-18 H.S. H.S. 26 26
27
Intermediate variables
Direct and indirect effects Intermediate variables Dec-18 Dec-18 Dec-18 Dec-18 Dec-18 Dec-18 H.S. H.S. H.S. H.S. H.S. 27 27 27 27 27 27
28
Exercise: Tea and depression
Write down the paths. You want the total effect of tea on depression. What would you adjust for? You want the direct effect of tea on depression. What would you adjust for? Is caffeine an intermediate variable or a variable on a confounder path? Tea and depression: Finnish study Caffeine reduces depression: Nurses Health Study 10 minutes Hintikka et al. 2005 Dec-18 H.S.
29
Exercise: Statin and CHD
Write down the paths. You want the total effect of statin on CHD. What would you adjust for? If lifestyle is unmeasured, can we estimate the direct effect of statin on CHD (not mediated through cholesterol)? Is cholesterol an intermediate variable or a collider? C cholesterol U lifestyle E statin D CHD Statin: lipid (cholesterol) lowering drug 10 minutes Dec-18 H.S. H.S. 29 29
30
Mixed Confounder, collider and mediator Dec-18 Dec-18 Dec-18 Dec-18
H.S. H.S. H.S. H.S. H.S. 30 30 30 30 30 30
31
Diabetes and Fractures
We want the total effect of Diabetes (type 2) on fractures Conditional Path Type Status 1 E→D Causal Open 2 E→F→D 3 E→B→D 4 E←[V]→B→D Non-causal Closed 5 E←[P]→B→D Unconditional Path Type Status 1 E→D Causal Open 2 E→F→D 3 E→B→D 4 E←V→B→D Non-causal 5 E←P→B→D Questions: Paths ←→? More paths? B a collider? V and P ind? Diabetes->eye disease->fall, could have ->eye disease->physical activity-> Diabetes II reduces bone density, BMI increases bone density Questions: more paths (E-B-P-E-D)? Two (or three) arrows are colliding in B, is B a collider? Mediators Confounders Dec-18 H.S.
32
Selection bias Three concepts Dec-18 Dec-18 Dec-18 Dec-18 Dec-18
H.S. H.S. H.S. H.S. H.S. 32 32 32 32 32 32
33
Selection bias: concept 1 Simple version
“Selected different from unselected” Prevalence (D) Old have lower prevalence than young Old respond less to survey Selection bias: prevalence overestimated Effect (E→D) Old have lower effect of E than young Selection bias: effect of E overestimated Selection bias often based on idea of difference: the selected are different from unselected. Must be different in what we are measuring. Different in prevalence Different in E-D effect Weight by stratum size or inverse stratum variance Dec-18 H.S.
34
Selection bias: concept 1 “Selected different from unselected”
Paths (but see concept 3) Type Status smoke®CHD Causal Open S age smoke CHD Normally, selection variables unknown Selection bias often based on idea of difference: the selected are different from unselected. Must be different in what we are measuring. Different in prevalence Different in E-D effect Weight by stratum size or inverse stratum variance Properties: - Need smoke-age interaction - Cannot be adjusted for, but stratum effects OK True RR=weighted average of stratum effects RR in “natural” range ( ) Scale dependent Name: interaction based? Dec-18 H.S.
35
Selection bias: concept 2 Simple version
“Distorted E-D distributions” DAG Collider bias Words Selection by sex and/or age Distorted sex-age distribution Old have more disease Men are more exposed Distorted E - D distribution Selection bias often based on idea of difference: the selected are different from unselected. Must be different in what we are measuring. Different in prevalence Different in E-D effect Weight by stratum size or inverse stratum variance Dec-18 H.S.
36
Selection bias: concept 2 “Distorted E-D distributions”
Paths Type Status smoke®CHD Causal Open smoke¬sex®[S]¬age®CHD Non-causal sex age smoke CHD Properties: Open non-causal path (collider) Does not need interaction Can be adjusted for (sex or age) Not in “natural” range (“surprising bias”) Name: Collider stratification bias Common table of properties? Both types of selection may operate in the named examples. Ref to Pearl Selection bias types: Berkson’s, loss to follow up, nonresponse, self-selection, healthy worker Hernan et al, A structural approach to selection bias, Epidemiology 2004 Dec-18 H.S.
37
1) “Exclusive or” selection
Dec-18 H.S.
38
Selection bias: concept 3 Outcome dependent selection
Selection into the study based on D. Get bias among selected. E D U Explanation: Always have exogenous U. D is a collider on E→D←U, S is a descendant of collider D. Conditioning on (a descendant of) a collider opens the E→D←U path, and U becomes associated with E. U now acts a confounder for E→D. Selection depends on: Strength of E→D. Strength of U→D Example of non-causal confounding Unmatched Case-Control Dec-18 H.S.
39
Exercise: Dust and COPD Chronic Obstructive Pulmonary Disease
Calculate the RR of dust on COPD in good and poor health groups. Write down the paths for the effect of E on D. E0 and D0 are unknown (past) measures. What would you adjust for? Suppose the crude effect of dust on COPD is RR=0.7 and the true RR=2. What do you call this bias? Could the concept 1 (interaction based) selection bias work here? S cur. worker D0 diseases H health E0 prior dust E cur. dust D COPD COPD risks: COPD: Chronic obstructive pulmonary disease Risk factors: smoking, air pollution, genetics, workplace dust 10 minutes Dec-18 H.S.
40
Convenience sample, homogenous sample
hospital Convenience: Conduct the study among hospital patients? E diabetes D fractures 2. Homogeneous sample: Population data, exclude hospital patients? Unconditional Path Type Status 1 E→D Causal Open 2 E→H←D Non-causal Closed Conditional Path Type Status 1 E→D Causal Open 2 E→[H]←D Non-Causal Collider, selection bias Collider stratification bias: at least on stratum is biased Dec-18 H.S.
41
Selection bias summing up
Concept 1 Concept 2 Concept 3 Selected differ from unselected in E-D effects Selected differ from unselected in E-D distributions Interaction based selection Collider stratification bias Outcome dependent selection “natural” effects “surprising” effects variance dependent Report stratum effects Adjust IPW smoke CHD U S smoke CHD age S smoke CHD age S sex Quite different concepts Dec-18 H.S.
42
Mediation Analysis Hafeman and Schwartz 2009; Lange and Hansen 2011;
Pearl 2012; Robins and Greenland 1992; VanderWeele 2009, 2014 Dec-18 H.S.
43
Why mediation analysis?
Have found a cause How does it work? M 𝑇𝑜𝑡𝑎𝑙 𝑒𝑓𝑓𝑒𝑐𝑡=𝑖𝑛𝑑𝑖𝑟𝑒𝑐𝑡+𝑑𝑖𝑟𝑒𝑐𝑡 indirect effect 𝑀𝑒𝑑𝑖𝑎𝑡𝑒𝑑 𝑝𝑟𝑜𝑝𝑜𝑟𝑡𝑖𝑜𝑛= 𝑖𝑛𝑑𝑖𝑟𝑒𝑐𝑡 𝑡𝑜𝑡𝑎𝑙 A direct effect Y Dec-18 H.S.
44
Counterfactual causal effect
Two possible outcome variables Outcome if treated: Y1 Outcome if untreated: Y0 Counterfactuals Potential outcomes Causal effect Individual: Y1i-Y0i Average: E(Y1)-E(Y0) or other effect measures Fundamental problem: either Y1 or Y0 is missing Hernan 2004 Dec-18 H.S.
45
Classic approach: controlled effect
Dec-18 H.S.
46
Controlled Direct effect
Effect of statin on CHD “for the same cholesterol” Fixed M m Fixed M: controlled direct effect CDE=E(Y|A=1,M=m) - E(Y|A=0,M=m) M cholesterol Problems Conceptual: Can we fix cholesterol levels? Technical: A*M Interaction? (Technical: non-linear models?) Statin: lipid (cholesterol) lowering drug A statin Y CHD 0/1 Solution? Robins and Greenland 1992; VanderWeele 2009 Dec-18 Dec-18 H.S. H.S. 46 46
47
New approach: natural effect
Dec-18 H.S.
48
“for the same cholesterol”
Natural Direct effect Direct effect: Effect of statin on CHD “for the same cholesterol” M1 M0 A set to 1 A set to 0 M0 M0 M cholesterol Natural Direct Effect: Keep M at M0 Statin: lipid (cholesterol) lowering drug 𝑁𝐷𝐸=𝐸 𝑌 1, 𝑀 0 −𝐸 𝑌 0, 𝑀 0 A statin Y CHD Takes care of the 3 earlier problems: Don’t need to fix M=m OK for interactions (OK for non-linear models) in 4 slides 0/1 Dec-18 Dec-18 H.S. H.S. 48 48
49
Time Dependent Confounding
Dec-18 H.S.
50
Time Dependent Confounder:
Motivating example Population: Exposure: Alcohol use at two time points Mediator/confounder: HDL cholesterol Outcome: Coronary Heart Disease HDL Time Dependent Confounder: a confounder (HDL) that depends on earlier exposure (A1) A1 A2 CHD Estimate: Joint effect of alcohol use (or effect of A1 and A2) Simplified DAG, several variables and arrows missing Could have HDL1 and HDL2 Common situation in patient-doctor follow up! Dec-18 HS
51
Alcohol and CHD DAG Process graph HDL HDL A1 Alcohol A2 CHD CHD
HDL is a confounder IPTW knocks out all arrows into A HDL is a mediator The process graph is simpler but less specific Ordinary adjustment does not work Must use Inverse Probability of Treatment Weighting, IPTW Dec-18 HS
52
Patient-Doctor prognostic factor Treatment regulated by
level of prognostic factor. Both affect later disease. treatment disease Dec-18 HS
53
Statins, cholesterol and CHD
U Variant 1 and 2 combined U=unmeasured common factor, lifestyle: diet, exercise statin CHD Dec-18 HS
54
Exercise: TimeDependentConfounding, Variants
a) Show the paths from E1 to D b) Show the paths from E2 to D c) Can you estimate the joint effect (E1+E2) in one ordinary regression model? E1 E2 D Variant 2: C2 U Variant 2: If time, do the same for variant 2 E1 E2 D May have both combined 10 min Dec-18 HS
55
Analysis under Time Dependent Confounding
Four methods, focus on just one: MSM using IPTW Four methods: MSM using IPTW Analysis under Time Dependent Confounding Dec-18 HS
56
Inverse Probability of Treatment Weighting
C Simple point treatment (exposure) E D Focus on probability of being exposed (binary) Subjects E 1 sum C 300 100 400 200 600 1000 Probabilities E 1 sum C 0.75 0.25 0.33 0.67 Weights E 1 C 1.3 4.0 3.0 1.5 𝑃(𝐸) 𝑃( 𝐸 ) 1/𝑃(𝐸) 1/𝑃( 𝐸 ) Propensity scores "Subjects" E 1 sum C 400 800 600 1200 1001 1000 2000 N*w N*w C E D Weighted analysis! Dec-18 HS
57
Inverse Probability of Treatment Weighting, Exercise
Sex Sample: 200 females, 100 use Paracet 800 males, 200 use Paracet Paracet D Calculate the risk of Paracet use for each sex. Calculate the RR of Paracet use for females versus males Do an inverse probability of treatment weighting for Paracet. Calculate the RR of Paracet use for females versus males in the reweighted pseudo data Explain the results in the DAG 8 min Dec-18 HS
58
Inverse Probability of Treatment Weighting
Time varying treatment (exposure) C1 C2 E is treatment, D is disease C is a prognostic factor E1 E2 D Time points t1 and t2 Weights: w1 w2 Weight at E2: Weight for the entire exposure and covariate history up to time 2 Weight by w1*w2 𝑤 𝑡 = 𝑘=1 𝑡 1 𝑃(exposure at k|cov. and exp. up to k) Ordinary weights: Alternative: stabilize by the probability of the baseline covariates (sex, education, …) Do not have any in this dag Vary a lot 𝑤𝑠 𝑡 = 𝑘=1 𝑡 𝑃(exposure at k|exposure up to k) 𝑃(exposure at k|cov. and exp. up to k) Stabilized weights: Vary less Cole and Hernan Veieroed, Lydersen et al Daniel, Cousens et al. 2013 Dec-18 HS
59
Marginal Structural Model
DAG for the reweighted pseudo data E1 ws E2 D MSM: The expected value of a counterfactual outcome D under a hypothetical exposure 𝑒 =(e1,e2): 𝐸 𝐷 𝑒 = 𝛼 0 + 𝛼 1 𝑒 1 + 𝛼 2 𝑒 2 Joint effect =𝐸 𝐷 1 −𝐸 𝐷 0 Veieroed, Lydersen et al Daniel, Cousens et al Rothman, Greenland et al. 2008 Dec-18 HS
60
MSM in Stata C1 C2 E1 E2 D 𝐸 𝐷 𝑒 = 𝛼 0 + 𝛼 1 𝑒 1 + 𝛼 2 𝑒 2 Easy-peasy!
* Probability of E1 regress E1 C1 predict p1 replace p1=1-p1 if E1==0 C1 C2 E1 E2 D * Probability of E2 regress E2 E1 C1 C2 predict p2 replace p2=1-p2 if E2==0 * Weights generate w=1/(p1*p2) 𝑤 𝑡 = 𝑘=1 𝑡 1 𝑃(exposure at k|cov. and exp. up to k) * MSM regress D E1 E2 [pw=w] 𝐸 𝐷 𝑒 = 𝛼 0 + 𝛼 1 𝑒 1 + 𝛼 2 𝑒 2 Easy-peasy! Dec-18 HS
61
Time dependent confounding, Summary
Occurrence is not rare depends on the data generating process Analysis Use Marginal Structural Models (MSM) solved with Inverse Probability of Treatment Weighting (IPTW) Dec-18 HS
62
Effects of adjustment Dec-18 H.S.
63
Effects of adjustment A C B E D What variables should we adjust for?
What are the effects of adjustment? E D Variable Adjust Bias Precision A B C no bias amplification reduce precision (collinearity) maybe no improve precision (model dependent) yes remove confounding ? (Pearl 2011)
64
Effects of adjustment: Precision
B Should we adjust for B? DAG: no bias from B, need not adjust E D May include B to improve precision, depends on model! E->D=1 in linear regr C->D=2 in linear regr D2=10% in logistic, crude E->D=1.17, adjusted E->D=1.43, no E-C interaction Including B: better precision Including B: worse precision OR not collapsible Robinson and Jewell 1991; Xing and Xing 2010 Dec-18 H.S.
65
Non-collapsibility of the odds ratio
Dec-18 H.S.
66
Non-collapsibility of the OR
D OR=5.1 Population effect: OR=3.6 C-spesific effect: OR=5.1 Dec-18 H.S.
67
Non-collapsibility of the OR
Non-collapsibility depends on frequency of D E D Not collapsible Appr. collapsible C:\Users\hest\Documents\Courses\Common files\Collapsibility of RR and OR Collapsible Dec-18 H.S.
68
Summing up so far Adjustment Collapsibility
Should not adjust for A (reduce precision) May adjust for B (improve precision) Should adjust for C (remove confounding) Collapsibility Collapsible measures: Risk Difference (RD), Rate Difference, Risk Ratio (RR) Non-collapsible measures: Odds Ratio (OR), Rate Ratio (HRR) Adjusting for B changes OR (and the HRR) but not due to confounding E D Dec-18 H.S.
69
Methods to remove confounding
Dec-18 H.S.
70
Methods to remove confounding
Action DAG effect C Condition: Restrict, Stratify, Adjust Close path E D C Cohort matching, Propensity Score Inverse Probability Treatment Weighting Remove CE arrow E D Stratification: non-parametric adjustment Regression: parametric adjustment Matching in cohort (C=age): for every exposed person, find an unexposed of the same age. Matching in CaseControl: for every case, find a control of the same age C Case-Control matching? Other methods? Remove CD arrow E D Dec-18 H.S.
71
Matching: Cohort vs Case-Control
Dec-18 H.S.
72
Matching in cohort, binary E
For every exposed person with a value of C, find an unexposed person with the same value of C S C E D selected based on E and C E independent of C after matching All open paths between C and E must C C→E C→[S]←E sum to “null” E D Cohort matching removes confounding Unfaithful DAG Stratification: non-parametric adjustment Regression: parametric adjustment Matching in cohort (C=age): for every exposed person, find an unexposed of the same age. Matching in CaseControl: for every case, find a control of the same age Cohort matching is not common, except in propensity score matching Mansournia et al. 2013; Shahar and Shahar 2012 Dec-18 H.S.
73
Matching in Case Control, binary D
For every case with a value of C, find a control with the same value of C C S E D selected based on D and C D independent of C after matching All open paths between C and D must C S C→D C→[S]←D sum to “null” E D C→E→D Stratification: non-parametric adjustment Regression: parametric adjustment Matching in cohort (C=age): for every exposed person, find an unexposed of the same age. Matching in CaseControl: for every case, find a control of the same age Matched CC analysis: 1-1 matching: conditional logistic (condition on matched pair) frequency matching: adjust for C Case-Control matching does not removes confounding, unless E→D=0 (or C→E=0) must adjust for C in all analyses Case-Control matching common, may improve precision (Mansournia et al. 2013; Shahar and Shahar 2012 Dec-18 H.S.
74
Drawing DAGs Dec-18 Dec-18 Dec-18 Dec-18 H.S. H.S. H.S. 74 74 74
75
Technical note on drawing DAGs
Drawing tools in Word (Add>Figure) Use Dia Use DAGitty Hand-drawn figure. Dec-18 H.S.
76
Direction of arrow C Does physical activity reduce smoking, or
does smoking reduce physical activity? ? E Phys. Act. D Diabetes 2 H Health con. C Smoking Maybe an other variable (health consciousness) is causing both? E Phys. Act. D Diabetes 2 Dec-18 H.S.
77
Drawing a causal DAG Start: E and D 1 exposure, 1 disease
add: [S] variables conditioned by design add: C-s all common causes of 2 or more variables in the DAG C C must be included common cause V may be excluded exogenous M may be excluded mediator K may be excluded unless we condition V E D M K Dec-18 H.S.
78
Exercise: Drawing survivor bias
We what to study the effect of exposure early in life (E) on disease (D) later in life. Exposure (E) decreases survival (S) in the period before D (deaths from other causes than D). A risk factor (R) reduces survival (S) in the period before D. The risk factor (R) increases disease (D). Only survivors are available for analysis (look at Collider idea). Draw and analyze the DAG 10 minutes Dec-18 Dec-18 H.S. H.S. 78
79
DAGitty Free program to draw and analyze DAGS Dec-18 Dec-18 Dec-18
H.S. H.S. H.S. 79 79 79
80
DAGitty background DAGitty Web page Draw DAGs Analyze DAGs Test DAGs
Run or download Johannes Textor, Theoretical Biology & Bioinformatics group, University of Utrecht Dec-18 HS
81
Interface Dec-18 HS
82
Draw model Draw new model New variables, connect, rename
Model>New model, Exposure, Outcome New variables, connect, rename n new variable (or double click) c connect (hit c over V1 and over V2 to connect) r rename d delete Status (toggle on/off) e exposure o outcome u unobserved a adjusted Draw Viatmin->Birth defects example Draw E and D New Age and Obesity Connect a-adjust, u-unobserved Dec-18 HS
83
Export DAG Export to Word or PowerPoint
“Zoom” the DAGitty drawing first (Ctrl-roll) Use “Snipping tool” or use Model>Export as PDF Without zooming With zooming Dec-18 HS
84
Model code Variable x y Age 1 @ 0.151, 0.840
Birth%20defects O @ 0.468, Obesity 1 @ 0.470, Vitamin E @ 0.145, x Arrow list Age Obesity Vitamin Obesity Birth%20defects Vitamin Birth%20defects y May change the x and y values to align the variables Dec-18 HS
85
Changed model code Aligning x and y coordinates (no space after ,)
Age 1 @0.1,0.8 Birth%20defects O @0.5,1.0 Obesity 1 @0.5,0.8 Vitamin E @0.1,1.0 Age Obesity Vitamin Obesity Birth%20defects Vitamin Birth%20defects 0.1 0.5 x 0.8 1.0 Copy, paste and Update DAG y Dec-18 HS
86
Exercises Dec-18 HS
87
Excercise Draw the Vitamin-Birth defects DAG
Use Obesity as an observed variable. Interpret the “Causal effect identification” Interpret the “Testable implications” Add arrow from Age to Birth defects Make obesity an unobserved variable Dec-18 HS
88
Excercise Draw the Statin-CHD DAG Use Lifestyle as an unobserved variable. Interpret the “Causal effect ident.” for total effects Interpret the “Causal effect ident.” for direct effects Interpret the “Testable implications” Dec-18 HS
89
Real world examples Dec-18 Dec-18 Dec-18 Dec-18 H.S. H.S. H.S. 89 89
90
Endurance training and Atrial fibrillation
Tobacco Cardiovascular factors * Alcohol consumption Socioeconomic Status ** BMI Diabetes Endurance training Atrial fibrillation Genetic disposition Health *** consciousness Hyperhyreosis Height Gender Missing arrows: for example from Age and Gender to BMI, Tobacco, Cardio, … Want direct effect of ET->AF, means close many paths, all missing paths are also closed. Infinite chain of causality! Close factor distant factor Age Long-distance racing Several arrows missing! *Hypertension, heart disease, high cholesterol ** Socioeconomic status: Education, marital status *** Unmeasured factors (Blue: Mediators, red: confounders, violet: colliders) Myrstad et al. 2014b
91
Randomized experiments Mendelian randomization
Randomized experiments: 3 reasons Interesting in the selves, understand ITT Basis for conditions for causal estimation: exchangeability and positivity Lead to IV methods, Mendelian rand Randomized experiments Mendelian randomization Dec-18 Dec-18 Dec-18 Dec-18 Dec-18 Dec-18 H.S. H.S. H.S. H.S. H.S. 91 91 91 91 91 91
92
Strength of arrow, randomization
C1 Not deterministic E D C2 C1, C2, C3 exogenous C3 C full compliance Full compliance no E-D confounding R E D deterministic U Not full compliance weak E-D confounding but R-D is unconfounded U could be: a condition that gives side effects of drug E (therefore less compliant) and gives risk of D not full compliance R E D Path Type Status 1 R®E®D Causal open 2 R®E¬U®D non-causal closed Sub analysis conditioning on E may lead to bias Dec-18 H.S.
93
Randomized experiments
Observational study Randomized experiment with full compliance R= randomized treatment E= actual treatment. R=E Randomized experiment with less than full compliance (c) c IVe No way of drawing that R=E or that R has strong effect on E (R-E arrow is determinisric) If R has strong effect on E then U must have weak effect, that is little confounding. ITT weaker than IV effect, combination of behavior (compliance) and biology Per Protocol=as treated If linear model: ITTe=c*IVe, c<1 ITTe IntentionToTreat effect: effect of R on D (unconfounded) population PerProtocol: crude effect of E on D (confounded by U) InstrumentalVariable effect: adjusted effect of E on D (if c is known, 2SLS) individual Dec-18 H.S.
94
RCT exercise R+ means randomized to treatment, E+ means treated and D+ means getting disease. 0.85 is the risk of treatment for R+ subjects, 0.00 is the risk for R- subjects, the risk difference is the difference between these. Calculate the compliance (c) as a risk difference from the table. Calculate the intention to treat effect (ITTe) as a risk difference. Calculate the per-protocol effect (PP) as a risk difference. Calculate the instrumental variable effect (IVe). Explain the results in words. P(U=1)=0.5 c IVe ITTe -0.15 0.22 10 minutes Dec-18 H.S.
95
Mendelian randomization
U Observational study Suffers from unmeasured confounding U Randomized trial: 3 conditions R affects E: balanced, strong effect No direct R-D effect: R independent of D | E R and D no common causes: R independent of U 3 R 1 E D 2 G->E Often E is a metabolite of common food or drink, G controls conversion into E, or out of E G often rare allele - wild type N=100 in RCT, N= in Medelian 5% non-compliance gives RR=20 for R,E association (If full compliance, can draw the do-operator) What happens with R-D ass if compliance drops? Discusiion paper: Sleiman and Grant, Clin Chem 2010 Examples of Mendelian rand from Sleiman and Grant: Honkanen R, Kroger H, Alhava E, Turpeinen P, Tuppurainen M, Saarikoski S. Lactose intolerance associated with fractures of weight-bearing bones in Finnish women aged 38–57 years. Bone 1997;21:473–7. Brennan P, McKay J, Moore L, Zaridze D, Mukeria A, Szeszenia-Dabrowska N, et al. Obesity and cancer: mendelian randomization approach utiliz- ing the FTO genotype. Int J Epidemiol 2009;38:971–5. Freathy RM, Bennett AJ, Ring SM, Shields B, Groves CJ, Timpson NJ, et al. Type 2 diabetes risk alleles are associated with reduced size at birth. Diabetes 2009;58:1428–33. 32. Zhao J, Li M, Bradfield JP, Wang K, Zhang H, Sleiman P, et al. Examination of type 2 diabetes loci implicates CDKAL1 as a birth weight gene. Diabetes 2009;58:2414–8. 33. Thorgeirsson TE, Geller F, Sulem P, Rafnar T, Wiste A, Magnusson KP, et al. A variant associ- ated with nicotine dependence, lung cancer and peripheral arterial disease. Nature 2008;452: 638–42. U Medelian randomization: 3 conditions G must affect E: unbalanced, weak large N No direct G-D effect: depends on gene function G and D no common causes: Mendel’s 2. law 3 G 1 E D 2 Sheehan et al, 2008 Dec-18 Dec-18 H.S. H.S. 95
96
Ex: Alcohol and blood pressure
BP U Observational study Alcohol use increases blood pressure Many ”lifestyle” confounders Gene: ALDH2, 2 alleles 2,2 type suffer nausea, headache after alcohol low alcohol regardless of lifestyle (U) Medelian randomization Gene ALDH2 is highly associated with alcohol OK, gene function is known Mendel’s 2. law, no ass. to obs. confounders U 3 John Maynard Smith Chen: meta analysis, n=7,658, RR=6-7 for alcohol use, typical in SNP studies is RR= Phenotypes: wildtype 1,1=57%, hetero 1,2=37%, risk homo 2,2=6%, that is fairly common risk type ALDH2: aldehyde dehydrogenase 2 Medelian randomization Gene common i Japan, RR=6-7 for alcohol use Gene no associated with age, smoking, BMI, cholesterol. Gene could be ass with coffe Gene function does not affect blood pressure Result: Meta analysis by Chen at al. 2008, alcohol lead to higher bp (1,1 versus 2,2 =+7.4mmHg) G 1 A BP Result: 1,1 type BP +7.4 mmHg Alcohol increases blood pressure 2 Chen et al 2008 Dec-18 Dec-18 H.S. H.S. 96
97
Limitations, problems and extensions of DAGs
Dec-18 H.S.
98
Limitations and problems of DAGs
New tool relevance debated, focus on causality Focus on bias precision also important Bias or not direction and magnitude Interaction scale dependent Static may include time varying variables Simplified infinite causal chain Simplified do not capture reality Dec-18 H.S.
99
DAG focus: bias, not precision
Should we adjust for C? DAG: no bias from C, need not adjust E D May include C to improve precision, depends on model! E->D=1 in linear regr C->D=2 in linear regr D2=10% in logistic, crude E->D=1.17, adjusted E->D=1.43, no E-C interaction Including C: better precision Including C: worse precision OR not collapsible Robinson and Jewell 1991; Xing and Xing 2010 Dec-18 H.S.
100
Signed DAGs and direction of bias
U M Positive or negative bias from confounding by U? + + Neg True E→D Pos E D on average Average monotonic effect + - X Y → for all Y=y Distributional monotonic effect To find direction of bias, multiply signs: Need distributional monotonic effects except at each end Positive bias from this confounding VanderWeele, Hernan & Robins, 2008 Dec-18 H.S.
101
Size of bias from unmeasured U
C A Y U Assume: Difference in the distribution of U for two levels for A: a1 ,a0 , does not vary with C Assume: Difference in expected value of Y for two levels of U : u1 ,u0 , does not vary with A and C 𝛼=𝑃 𝑢 𝑎 1 −𝑃 𝑢 𝑎 0 γ=𝐸 𝑌 𝑢 1 −𝐸 𝑌 𝑢 0 if linear model γ=𝐸 𝑌 𝑢 1 /𝐸 𝑌 𝑢 if RR model episens Bias = 𝛼∗𝛾 if linear model Bias = 1+ 𝛾−1 𝑃 𝑢 𝑎 𝛾−1 𝑃 𝑢 𝑎 0 if RR model Stata: episens VanderWeele & Arah 2011 Dec-18 H.S.
102
Interaction in DAGs + = DAG Causal pie Extended DAG C C C D E,C D E E
Mech- anisms C C C C E C + = D E,C D E E E E Red arrow = interaction Specify scale VanderWeele and Robins 2007 Dec-18 H.S.
103
DAGs and time processes
DAGs often static, but may have time varying A1, A2,… Want total effect of A-s, Time Dependent Confounding DAG Process graph HDL HDL A1 A2 CHD Alcohol CHD The process graph is simpler but less specific The process graph allows feedback loops and has a clear time component Aalen et al. 2012 Dec-18 HS
104
Most paths involving variables back in the chain (U)
Infinite causal chain U we adjust for variables E D in the analysis Most paths involving variables back in the chain (U) will be closed Dec-18 H.S.
105
DAGs are simplified DAGs are models of reality
must be large enough to be realistic, small enough to be useful Dec-18 H.S.
106
Better discussion based on DAGs before your conclusions
Summing up Data driven analyses do not work. Need causal information from outside the data. DAGs are intuitive and accurate tools to display that information. Paths show the flow of causality and of bias and guide the analysis. DAGs clarify concepts like confounding and selection bias, and show that we can adjust for both. Better discussion based on DAGs Draw your assumptions before your conclusions Dec-18 Dec-18 Dec-18 H.S. H.S. H.S. 106 106
107
Recommended reading Books Papers
Hernan, M. A. and J. Robins. Causal Inference. Web: Rothman, K. J., S. Greenland, and T. L. Lash. Modern Epidemiology, 2008. Morgan and Winship, Counterfactuals and Causal Inference, 2009 Pearl J, Causality – Models, Reasoning and Inference, 2009 Veierød, M.B., Lydersen, S. Laake,P. Medical Statistics. 2012 Papers Greenland, S., J. Pearl, and J. M. Robins. Causal diagrams for epidemiologic research, Epidemiology 1999 Hernandez-Diaz, S., E. F. Schisterman, and M. A. Hernan. The birth weight "paradox" uncovered? Am J Epidemiol 2006 Hernan, M. A., S. Hernandez-Diaz, and J. M. Robins. A structural approach to selection bias, Epidemiology 2004 Berk, R.A. An introduction to selection bias in sociological data, Am Soc R 1983 Greenland, S. and B. Brumback. An overview of relations among causal modeling methods, Int J Epidemiol 2002 Weinberg, C. R. Can DAGs clarify effect modification? Epidemiology 2007 Hernan and Robins Causal inference (web) Hernan a struct approach Hernandez- From causal Shahar Rothman Dec-18 Dec-18 Dec-18 Dec-18 H.S. H.S. H.S. 107 107 107
108
References 1 Aalen OO, Roysland K, Gran JM, Ledergerber B Causality, mediation and time: A dynamic viewpoint. Journal of the Royal Statistical Society Series A 175: Chen L, Davey SG, Harbord RM, Lewis SJ Alcohol intake and blood pressure: A systematic review implementing a mendelian randomization approach. PLoS Med 5:e52. Daniel RM, Cousens SN, De Stavola BL, Kenward MG, Sterne JAC Methods for dealing with time-dependent confounding. Statistics in Medicine 32: Greenland S, Schlesselman JJ, Criqui MH Re: "The fallacy of employing standardized regression coefficients and correlations as measures of effect". AJE 125: Greenland S, Robins JM, Pearl J Confounding and collapsibility in causal inference. Statistical Science 14:29-46. Greenland S, Brumback B An overview of relations among causal modelling methods. Int J Epidemiol 31: Greenland S, Mansournia MA Limitations of individual causal models, causal graphs, and ignorability assumptions, as illustrated by random confounding and design unfaithfulness. Eur J Epidemiol. Greenland SM, Malcolm; Schlesselman, James J.; Poole, Charles; Morgenstern, Hal Standardized regression coefficients: A further critique and review of some alternatives. Epidemiology 2:6. Hafeman DM, Schwartz S Opening the black box: A motivation for the assessment of mediation. International Journal of Epidemiology 38: Hernan MA, Hernandez-Diaz S, Werler MM, Mitchell AA Causal knowledge as a prerequisite for confounding evaluation: An application to birth defects epidemiology. AJE 155: Hernan MA, Hernandez-Diaz S, Robins JM A structural approach to selection bias. Epidemiology 15: Hernan MA, Cole SR Causal diagrams and measurement bias. AJE 170: Hernan MA, Clayton D, Keiding N The simpson's paradox unraveled. Int J Epidemiol. Hintikka J, Tolmunen T, Honkalampi K, Haatainen K, Koivumaa-Honkanen H, Tanskanen A, et al Daily tea drinking is associated with a low level of depressive symptoms in the finnish general population. European Journal of Epidemiology 20: Lange T, Hansen JV Direct and indirect effects in a survival context. Epidemiology 22: Mansournia MA, Hernan MA, Greenland S Matched designs and causal diagrams. International Journal of Epidemiology 42: McCaffrey DF, Ridgeway G, Morral AR Propensity score estimation with boosted regression for evaluating causal effects in observational studies. Psychological Methods 9: Myrstad M, Lochen ML, Graff-Iversen S, Gulsvik AK, Thelle DS, Stigum H, et al. 2014a. Increased risk of atrial fibrillation among elderly norwegian men with a history of long- term endurance sport practice. Scand J Med Sci Spor 24:E238-E244. Dec-18 H.S.
109
References 2 Pearl J Causality: Models, reasoning, and inference. Cambridge:Cambridge Univeristy Press. Pearl J The causal mediation formula-a guide to the assessment of pathways and mechanisms. Prev Sci 13: Robins JM, Greenland S Identifiability and exchangeability for direct and indirect effects. Epidemiology 3: Robins JM Data, design, and background knowledge in etiologic inference. Epidemiology 12: Robinson LD, Jewell NP Some surprising results about covariate adjustment in logistic-regression models. Int Stat Rev 59: Rothman KJ, Greenland S, Lash TL Modern epidemiology. Philadelphia:Lippincott Williams & Wilkins. Shahar E Causal diagrams for encoding and evaluation of information bias. Journal of evaluation in clinical practice 15: Shahar E, Shahar DJ Causal diagrams and the logic of matched case-control studies. Clinical epidemiology 4: Sheehan NA, Didelez V, Burton PR, Tobin MD Mendelian randomisation and causal inference in observational epidemiology. PLoS Med 5:e177. Textor J, Hardt J, Knuppel S Dagitty a graphical tool for analyzing causal diagrams. Epidemiology 22: VanderWeele TJ, Robins JM Directed acyclic graphs, sufficient causes, and the properties of conditioning on a common effect. AJE 166: VanderWeele TJ, Hernan MA, Robins JM Causal directed acyclic graphs and the direction of unmeasured confounding bias. Epidemiology 19: VanderWeele TJ Mediation and mechanism. Eur J Epidemiol 24: VanderWeele TJ, Arah OA Bias formulas for sensitivity analysis of unmeasured confounding for general outcomes, treatments, and confounders. Epidemiology 22:42-52. VanderWeele TJ, Hernan MA Results on differential and dependent measurement error of the exposure and the outcome using signed directed acyclic graphs. AJE 175: VanderWeele TJ A unification of mediation and interaction: A 4-way decomposition. Epidemiology 25: Veieroed M, Lydersen S, Laake P Medical statistics in clinical and epidemiological research. Oslo:Gyldendal Akademisk. Westreich D, Greenland S The table 2 fallacy: Presenting and interpreting confounder and modifier coefficients. AJE 177: Xing C, Xing GA Adjusting for covariates in logistic regression models. Genet Epidemiol 34: Dec-18 H.S.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.