To get ready for class: 1. Get births ready as usual

Slides:



Advertisements
Similar presentations
M2 Medical Epidemiology
Advertisements

Presentation, data and programs at:
EPID Introduction to Analysis and Interpretation of HIV/STD Data Confounding Manya Magnus, Ph.D. Summer 2001 adapted from M. O’Brien and P. Kissinger.
Using causal graphs to understand bias in the medical literature.
Linear Regression and Binary Variables The independent variable does not necessarily need to be continuous. If the independent variable is binary (e.g.,
Introduction to probability theory and graphical models Translational Neuroimaging Seminar on Bayesian Inference Spring 2013 Jakob Heinzle Translational.
Missing Data Issues in RCTs: What to Do When Data Are Missing? Analytic and Technical Support for Advancing Education Evaluations REL Directors Meeting.
Writing a Research Paper
Jeffrey D. Ullman Stanford University Flow Graph Theory.
FINAL REVIEW BIOST/EPI 536 December 14, Outline Before the midterm: Interpretation of model parameters (Cohort vs case-control studies) Hypothesis.
Covariate Selection for Observational Comparative Effectiveness Research Prepared for: Agency for Healthcare Research and Quality (AHRQ)
EPIDEMIOLOGY Why is it so damn confusing?. Disease or Outcome Exposure ab cd n.
1 PH 240A: Chapter 8 Mark van der Laan University of California Berkeley (Slides by Nick Jewell)
Causal Graphs, epi forum
Concepts of Interaction Matthew Fox Advanced Epi.
Oct-15H.S.1Oct-15H.S.1Oct-151 H.S.1Oct-15H.S.1Oct-15H.S.1 Causal Graphs, epi forum Hein Stigum
Introduction to confounding and DAGs
V13: Causality Aims: (1) understand the causal relationships between the variables of a network (2) interpret a Bayesian network as a causal model whose.
California Educational Research Association Annual Meeting Rancho Mirage, CA – December 5, 2008 Hoky Min, Gregory K. W. K. Chung, Rebecca Buschang, Lianna.
INTERVENTIONS AND INFERENCE / REASONING. Causal models  Recall from yesterday:  Represent relevance using graphs  Causal relevance ⇒ DAGs  Quantitative.
01/20151 EPI 5344: Survival Analysis in Epidemiology Confounding and Effect Modification March 24, 2015 Dr. N. Birkett, School of Epidemiology, Public.
Unit 11: Evaluating Epidemiologic Literature. Unit 11 Learning Objectives: 1. Recognize uniform guidelines used in preparing manuscripts for publication.
Mediation: The Causal Inference Approach David A. Kenny.
Brad Legault Soft Computing CONDITIONAL DEPENDENCE & INDEPENDENCE.
Variable selection in Regression modelling Simon Thornley.
Figure 1. Illustrating confounders with a directed acyclic graph. A.A. Akinkugbe et al. J DENT RES 2016; Copyright © by International &
Angles Building shapes with directional lines. Drawing with angles allows you to break complex forms into simple directional lines. Drawing with angled.
Mediation. 1.Definition 2. Testing mediation using multiple regression Baron, R. M., & Kenny, D. A. (1986). The moderator-mediator variable distinction.
Using Directed Acyclic Graphs (DAGs) to assess confounding Glenys Webster & Anne Harris May 14, 2007 St Paul’s Hospital Statistical “Rounds”
Asking the right questions to stimulate students’ minds.
Reading & Science ACT Strategies We don’t have the time to take away from our daily instruction to focus directly on the ACT in some of these areas Extra.
Workshop to develop theories of change
Principles of Quantitative Research
Experiment Basics: Designs
CompSci 230 Software Construction
General principles in building a predictive model
Can People ‘Like Me’ Go to College? Inequality and Academic Motivation
Statistics for the Social Sciences
12 Inferential Analysis.
R Programming III: Real Things with Real Data!
Software Quality Engineering
Ggplot2 I EPID 799C Mon Sep
A SOAP Approach to Clinical Research Design and Analysis
Chapter 13 Multiple Regression
BMTRY 747: Introduction Jeffrey E. Korte, PhD
Effective Feedback, Rubrics, and Grading
Program Slicing Baishakhi Ray University of Virginia
Epidemiology 101 Epidemiology is the study of the distribution and determinants of health-related states in populations Study design is a key component.
Recoding II: Numerical & Graphical Descriptives
Causal Networks Farrokh Alemi, PhD.
CS 201 Compiler Construction
Hein Stigum courses DAGs intro, Answers Hein Stigum courses 28. nov. H.S.
Saturday, August 06, 2016 Farrokh Alemi, PhD.
Propagation Algorithm in Bayesian Networks
Impact Evaluation Methods
12 Inferential Analysis.
Evaluating Effect Measure Modification
DAGs intro without exercises 1h Directed Acyclic Graph
To get ready for class: 1. Get births ready as usual
Modeling the Causal Effects of Assisted Reproductive Technology (ART)
Generalized Linear Models (GLM) in R: Part 2
SRM II Review of key concepts
DESIGN OF EXPERIMENTS by R. C. Baker
Counterfactual models Time dependent confounding
Causal Models for Regression Modeling Strategies
Risk Adjusted P-chart Farrokh Alemi, Ph.D.
Module 4: The Highlights!
Let’s explore angles in triangles.
Misc Internal Validity Scenarios External Validity Construct Validity
Effect Modifiers.
Presentation transcript:

To get ready for class: 1. Get births ready as usual 2. Install package dagitty

DAGs EPID 799C Fall 2017

Overview Quick note on table() / prop.table() / EMM from last class Overview of DAGs DAGs in R

On prop.table()… # Thinking ahead to EMM pt2 = prop.table(table(births$pnc5_f, births$preterm_f, births$raceeth_f), margin = c(1,3)) #risks. Note we're getting into dplyr is better territory... pt2[2,1,]-pt2[1,1,] #Crude RDs pt2[1,2,] # term births, no PNC pt2_df = data.frame(pt2) names(pt2_df) = c("exposure", "outcome", "group", "estimate") ggplot(data=pt2_df[pt2_df$outcome == "preterm",], aes(x=exposure, y=estimate, color=group, group=group))+ geom_point()+geom_path()+ labs(title="Quick look at Crude EMM of RD by Race-Ethnicity", x= "Prevalence of Preterm Birth", subtitle="Note possible EMM in the angle of the lines... \n ...and disparities more impactful than our intervention. ")

…we’ll improve this with some dplyr, but just from a quick table and ggplot…

What is a DAG? DAGs (Directed Acyclic Graphs) document causal assumptions / knowledge from our head or literature. They can be used to guide us to better answer questions like: Does a change in A prompt a change in B? Or the other way around? Or not in either direction, but their association is caused by some third thing?

DAG Requirements Directed: , not -- Acyclic: AB, not AB and BA Graph: Connected, not dangling*. Other disciplines, from engineering to other forms of statistical model, relax these requirements.

Overview Directed: , not -- Acyclic: AB, not AB and BA Graph: Connected, not dangling*.

Mediation

Confounders

Colliders Inducing a biased causal association through controlling a collider is: collider stratification bias

Effect Measure Modifiers

EMM: Two notes Note that an EMM may or may not be a confounder (influencing the values of A and B directly, vs. the effect of A on B), so may not be in the DAG node network. EMMs are good for a DAG notes though! Also note that it may be rare that an exposure / intervention switches direction entirely. Effect measure modification worth acknowledging may be a matter of degree… or important to report because of context - regardless of statistical interaction, p=whatever.

In Sum: Create a model, throw things in, reduce by p-value / backwards selection, or any of a number of techniques. May be good at predicting outcome from exposure and other variables. There is nuance here, but…

In Sum: …if we want the causal effect, we have to be intentional about what parts of this flow we block. We leave direct and indirect causal paths, and leave blocked paths with colliders (do not control!)

How do we do this? Encode the nodes and directed edges of the DAG from the literature / content knowledge By eye, hand, or software document all paths between Exposure and Outcome Identify whether they are already blocked (collider), backdoor (confounded), or causal (direct or indirect through a mediator) Select nodes to statistically control, often ideally as few as possible, to block the open backdoor paths without blocking

DAG critiques Reality isn’t DAGGY Not all nodes / edges are alike DAGs (even if large) are a model, and so a simplified version of reality, in this particular case requiring unidirectionality and acyclic assumptions. Reality is often a system with feedback loops and inter-relationships that may not be modeled well with unidirectional models, perhaps especially with social / network processes. There are other methods! Not all nodes / edges are alike Race-ethnicity in particular is a heavily overloaded construct, reaching back to represent historical and current systemic oppression and racism, physical phenotype, experiences of cultural and ascribed identity. Parts of this construct may have different causal relationships. Break apart if you can, and regardless, be mindful / nuanced in your interpretation. Not always interested in causal effects Prediction, association, other techniques have a place in a public health toolbox. VanderWeele, Tyler J., and Whitney R. Robinson. “On the Causal Interpretation of Race in Regressions Adjusting for Confounding and Mediating Variables:” Epidemiology 25, no. 4 (July 2014): 473–84. doi:10.1097/EDE.0000000000000105.

Our (toy) DAG Directed Acyclic Graphs (DAGs) inform our variable selection and treatment in models (based on their status as mediators, confounders, effect measure modifiers, etc. We will not elaborate in this class! Take the Epi sequence for more. DAG from EPID 716 / Christy Avery

Let’s Try: Dagitty Check it out here: www.dagitty.net Premade DAG for you: dagitty.net/moAh6a6

DAGs in R Dagitty (http://www.dagitty.net/dags.html#) exports R code for the dagitty package DL the R script from the website: http://learnr.web.unc.edu/files/2017/10/L13- DAGs.zip

Let’s Try: DAGs in R dagitty() : makes DAGs adjustmentSets() : minimal / all adjustment sets paths() : paths! children(), etc. downloadGraph – design in dagitty, pull down in R instrumentalVariables(), SEM stuff, testing your data against a DAG, etc. Currently beyond me!

Practical Uses R may be helpful for quickly changing and rerunning for minimal sets a few different DAG scenarios. Probably better than hand. Nice pair with dagitty website. Maybe useful for SEM? I dunno. But you can stick your DAGs in papers / R Markdown, make ggplots of them, etc.

Other Packages If you do this a lot, find your favorite! R skills let you translate data structures across packages as you need to. dagitty: Today! DiagrammeR: Prettier, but no adjustment sets? https://donlelek.github.io/2015-03-31-dags-with-r/ dagR: Prettier and adjustment sets, but funny syntax? http://rstudio-pubs- static.s3.amazonaws.com/2609_e3d86d0748c04eb18d5f 56d6a99feb3f.html