Construction of Causal Diagrams using DAGitty Kim Carmela D. Co Department of Epidemiology and Biostatistics College of Public Health University of the Philippines - Manila
Introduction http://www.dagitty.net/ Web-based software for drawing and analyzing causal diagrams, also known as directed acyclic graphs (DAGs) Developed by Johannes Textor Also available as an R package
Utility Identification of suitable, small sufficient adjustment sets in complex causal diagrams Identification of causal and biasing paths Identification of testable implications in a given diagram Identification of potential instrumental variables
Exposure variable is green with a right pointing arrow Outcome variable is blue with a bar Main association indicated by a green arrow Can drag any variable anywhere in the screen
Creating the DAG T o add more variables: Double click anywhere in the area or press N (“new”) Default color is dark grey To place arrows in the causal DAG: Double click the variable (or hover cursor on variable and press C “connect”) where the arrow will come from (“parent variable”) Hover cursor on variable where arrow will point to and press C (“daughter variable”) Press C again (while cursor is hovering over the daughter variable) to remove the arrow
Ancestors of exposure are green, ancestors of outcome are blue Ancestors of both exposure and outcome are red Red arrows indicate biasing pathways Arrows can be left-clicked and dragged to change its shape
Changing Variable Status
Indicates minimum set of variables that have to be adjusted for in order to estimate the causal effect of the exposure on the outcome “smallest number of variables” Minimum set of variables to estimate the direct effect of the exposure on the outcome Removing pathways with intermediate variables Identification of potential instrumental variables, if the model is correctly specified
Independencies implied by the model Can be checked to determine if the model is correctly specified Maternal age and socio-economic status are independent?
Saving the DAG Copy model code to notepad to “save” Code can be pasted to “load” the DAG
Open paths = Statistical association Blocked paths = Statistical independence
Exercise Open Shrier & Platt, 2008 Which variables are “confounders” using the traditional meaning? Label team motivation, pregame proprioception, neuromuscular fatigue, and tissue weakness as unmeasured variables. Adjust for the necessary variables to be able to estimate the causal effect of interest. Adjust for the variable previous injury.
Reference Textor , Johannes (2015) Drawing and Analyzing Causal DAGs with DAGitty . Accessed from: http:// www.dagitty.net/manual-2.x.pdf