class: center, middle, inverse, title-slide .title[ # Class Activity: DAG Construction ] .subtitle[ ## PS 312 ] .author[ ### Jaye Seawright ] .date[ ### 2026-04-08 ] --- ## Today's Activity - **Goal:** Translate your team's research question into a **Directed Acyclic Graph (DAG)**. - **Deliverable:** Each group member sends the DAG to their TA with a short paragraph explaining the nodes and edges. - **Why?** DAGs make causal assumptions transparent and guide covariate selection. I'll walk through an example from my own work on the January 6 insurrection, building the DAG step by step. --- ## Step 1: The Core Relationship **Research Question:** Does social media use increase the likelihood of engaging in violence during the January 6 Capitol attack? We start with the simplest possible DAG: just the exposure and the outcome. <!-- --> - **SocialMedia:** Use of platforms like Twitter, Facebook, Parler, YouTube to live broadcast the experience of January 6th. - **Violence:** Physical aggression during the Capitol breach (assault, property destruction). This is our starting hypothesis. But is this relationship causal, or could something else explain it? --- ## Step 2: Adding Confounders To estimate the causal effect of SocialMedia on Violence, we need to consider **confounders**—variables that affect both the exposure and the outcome. <!-- --> --- **Confounders (each affects both SocialMedia and Violence):** - **PoliticalEngagement:** Activists use social media more and attend more protests (some turn violent). - **InternetUse:** Tech‑savvy individuals use social media heavily and were over‑represented in D.C. - **Personality:** Traits like sensation‑seeking or aggression. - **Age:** Younger people use social media more and may be more impulsive. - **Education:** Correlated with digital literacy and political participation. - **Region:** Areas with strong pro‑Trump sentiment had higher social media engagement and rally attendance. **Implication:** To estimate SocialMedia → Violence without bias, we must control for these confounders. --- ## Step 3: Downstream Consequences Some participants may have been motivated by a desire for **media visibility**. Does engaging in violence increase post‑attack fame? <!-- --> --- **New Nodes:** - **MediaVisibility:** Post‑attack media coverage (news articles, interviews, social media fame). - **PriorFame:** Pre‑existing public profile (e.g., local politician, internet personality). **New Edges:** - **Violence → MediaVisibility:** Violent acts attract coverage—this could be a motive. - **PriorFame → MediaVisibility:** Famous people get more coverage regardless. - **PriorFame → Violence:** (Dashed) Possible that prior fame increases propensity to act out. **Analytical Note:** If we want to estimate Violence → MediaVisibility, we must control for PriorFame (a confounder of that relationship). --- ## How This DAG Informs Analysis - For **SocialMedia → Violence:** Control for PoliticalEngagement, InternetUse, Personality, Age, Education, Region. - **Do NOT** control for MediaVisibility (it's downstream). - For **Violence → MediaVisibility:** Control for PriorFame; consider instrument or natural experiment for Violence. --- ## Your Turn 1. Sketch a DAG for your team's research question, starting simple and building up. 2. Label each node and explain it. Your entire explanation need not exceed a paragraph. 3. Identify: - The main variables that represent your causal question - Background variables that help us understand the situation and meaningful differences among cases - Variables that help tell the causal story of how effects might work - Downstream variables that help interpret the causal question 4. Send your DAG (image or R code) and paragraph to your TA. **Resources:** - [Class DAG Help Page](https://jnseawright.github.io/PS312/InClass/Causation_Causal_Inference.html) - `dagitty` and `ggdag` R packages --- ``` r # Example R code for students: library(dagitty) my_dag <- dagitty('dag { X -> Y Z -> X Z -> Y }') plot(my_dag) ```