Fiveable

๐Ÿ“ŠCausal Inference Unit 9 Review

QR code for Causal Inference practice questions

9.1 Directed acyclic graphs (DAGs)

๐Ÿ“ŠCausal Inference
Unit 9 Review

9.1 Directed acyclic graphs (DAGs)

Written by the Fiveable Content Team โ€ข Last updated September 2025
Written by the Fiveable Content Team โ€ข Last updated September 2025
๐Ÿ“ŠCausal Inference
Unit & Topic Study Guides

Directed acyclic graphs (DAGs) are powerful tools for visualizing and analyzing causal relationships in complex systems. They use nodes to represent variables and directed edges to show causal influences, helping researchers identify potential confounders and estimate causal effects.

DAGs play a crucial role in causal inference by encoding conditional independence relationships and facilitating the application of causal assumptions. They guide researchers in selecting appropriate variables for adjustment, conducting mediation analysis, and addressing challenges like confounding and selection bias.

Definition of DAGs

  • Directed Acyclic Graphs (DAGs) are graphical models used to represent causal relationships between variables in a system
  • DAGs consist of nodes representing variables and directed edges representing causal relationships between the variables
  • DAGs provide a visual and intuitive way to express causal assumptions and facilitate reasoning about causal relationships in complex systems

Nodes and edges

  • Nodes in a DAG represent variables or factors in a causal system (age, gender, treatment, outcome)
  • Directed edges, represented by arrows, indicate the direction of causal influence from one node to another
    • An edge from node A to node B (A โ†’ B) signifies that A has a direct causal effect on B
  • Absence of an edge between two nodes implies no direct causal relationship between the variables

Acyclic property

  • DAGs are acyclic, meaning they do not contain any directed cycles or feedback loops
  • The acyclic property ensures that there are no causal loops, where a variable directly or indirectly causes itself
  • Acyclicity is essential for establishing a clear causal ordering and avoiding paradoxical situations in causal reasoning

Directed paths

  • A directed path in a DAG is a sequence of nodes connected by directed edges, following the direction of the arrows
  • Directed paths represent the flow of causal influence from one variable to another
  • The presence of a directed path from node A to node B (A โ†’ ... โ†’ B) suggests that A has a causal effect on B, either directly or through intermediary variables
  • Identifying directed paths helps in understanding the causal relationships and potential confounding factors in a system

Markov properties of DAGs

  • Markov properties are a set of assumptions that relate the structure of a DAG to the probabilistic independence relationships among the variables
  • These properties allow for efficient computation of probabilities and enable causal reasoning based on the DAG structure
  • Understanding Markov properties is crucial for leveraging DAGs in causal inference and probabilistic modeling

Factorization according to DAG

  • The joint probability distribution of the variables in a DAG can be factorized as the product of the conditional probabilities of each node given its parents
  • Factorization property: $P(X_1, X_2, ..., X_n) = \prod_{i=1}^n P(X_i | Pa(X_i))$, where $Pa(X_i)$ denotes the parents of node $X_i$ in the DAG
  • This factorization reduces the complexity of specifying the joint distribution and allows for more efficient computation and estimation

Conditional independence

  • DAGs encode conditional independence relationships among variables based on the graph structure
  • Two variables $X$ and $Y$ are conditionally independent given a set of variables $Z$ if $P(X,Y|Z) = P(X|Z)P(Y|Z)$
  • Conditional independence properties, such as the local Markov property and global Markov property, can be read off from the DAG structure
  • These properties help in simplifying probabilistic computations and identifying potential confounders or mediators in causal analysis

D-separation criterion

  • D-separation (directed separation) is a graphical criterion used to determine conditional independence relationships in a DAG
  • Two sets of nodes $X$ and $Y$ are d-separated by a set of nodes $Z$ if every path between $X$ and $Y$ is blocked by $Z$
  • Blocking occurs when the path contains a collider (a node with two incoming arrows) that is not in $Z$ or has no descendant in $Z$, or a non-collider that is in $Z$
  • If $X$ and $Y$ are d-separated by $Z$ in a DAG, then they are conditionally independent given $Z$ in any probability distribution compatible with the DAG

Causal interpretation of DAGs

  • DAGs can be used to represent causal relationships and make causal inferences based on certain assumptions
  • The causal interpretation of DAGs relies on the idea that the directed edges represent causal influences rather than mere associations
  • To make valid causal inferences from a DAG, several key assumptions need to be satisfied

Causal Markov assumption

  • The causal Markov assumption states that a variable is independent of its non-descendants given its direct causes (parents) in the DAG
  • This assumption implies that the DAG captures all the relevant causal relationships among the variables
  • Under the causal Markov assumption, the factorization property of the DAG corresponds to the causal structure of the system

Causal sufficiency assumption

  • The causal sufficiency assumption requires that all common causes of the observed variables are included in the DAG
  • This assumption ensures that there are no unmeasured confounding variables that affect multiple observed variables
  • Violating causal sufficiency can lead to spurious associations and biased causal estimates

Causal faithfulness assumption

  • The causal faithfulness assumption states that the conditional independence relationships implied by the DAG are exactly those that hold in the probability distribution
  • This assumption rules out the possibility of accidental or fine-tuned cancellations of causal effects
  • Faithfulness ensures that the causal structure can be inferred from the observed data and that the DAG provides a complete representation of the causal relationships

DAGs vs other graphical models

  • DAGs are one type of graphical model used for representing and reasoning about probabilistic and causal relationships
  • It is important to understand the similarities and differences between DAGs and other commonly used graphical models
  • Comparing DAGs with alternative models helps in selecting the appropriate framework for a given problem and understanding their strengths and limitations

Comparison with Bayesian networks

  • Bayesian networks, also known as belief networks, are directed graphical models that represent probabilistic dependencies among variables
  • Like DAGs, Bayesian networks use directed edges to indicate dependence relationships between nodes
  • However, Bayesian networks do not necessarily have a causal interpretation and focus primarily on probabilistic reasoning and inference
  • DAGs, on the other hand, explicitly represent causal relationships and enable causal reasoning based on the graph structure

Comparison with structural equation models

  • Structural equation models (SEMs) are another framework for representing and analyzing causal relationships
  • SEMs consist of a set of equations that describe the functional relationships between variables, along with a graphical representation (path diagram)
  • SEMs can be seen as a parametric instantiation of DAGs, where the equations specify the quantitative causal effects
  • While DAGs focus on the qualitative causal structure, SEMs provide a more quantitative approach to causal modeling and estimation
  • DAGs and SEMs are closely related, and DAGs can serve as a basis for specifying and interpreting SEMs

Constructing DAGs from data

  • Learning the structure of a DAG from observational data is a key task in causal discovery and inference
  • Several approaches have been developed to infer the causal structure based on statistical patterns in the data
  • These methods aim to identify the most plausible DAG that explains the observed dependencies and independencies among variables

Constraint-based methods

  • Constraint-based methods, such as the PC algorithm and its variants, rely on conditional independence tests to infer the DAG structure
  • These methods start with a fully connected graph and iteratively remove edges based on conditional independence constraints
  • Conditional independence tests, such as the chi-square test or mutual information, are used to assess the independence relationships between variables
  • The resulting DAG represents the causal structure that is consistent with the observed conditional independencies

Score-based methods

  • Score-based methods, such as the Greedy Equivalence Search (GES) algorithm, use a scoring function to evaluate the fit of different DAG structures to the data
  • The scoring function, such as the Bayesian Information Criterion (BIC) or the Bayesian Dirichlet equivalent (BDe) score, measures the trade-off between model complexity and goodness of fit
  • These methods search through the space of possible DAGs and select the one with the highest score
  • The selected DAG represents the most probable causal structure given the observed data and prior assumptions

Hybrid methods

  • Hybrid methods combine elements of constraint-based and score-based approaches to learn the DAG structure
  • These methods aim to leverage the strengths of both approaches and overcome their individual limitations
  • One example is the Max-Min Hill-Climbing (MMHC) algorithm, which uses a constraint-based method to identify a set of candidate parent sets for each node and then applies a score-based search to find the optimal DAG
  • Hybrid methods often exhibit better performance and robustness compared to purely constraint-based or score-based methods

Applications of DAGs in causal inference

  • DAGs have numerous applications in causal inference, providing a powerful framework for analyzing and interpreting causal relationships
  • By explicitly representing the causal structure, DAGs enable researchers to address various challenges in causal analysis
  • Some key applications of DAGs in causal inference include identifying causal effects, dealing with confounding, and conducting mediation analysis

Identifying causal effects

  • DAGs help in identifying the causal effect of an intervention or treatment on an outcome variable
  • By examining the paths between the treatment and outcome nodes in the DAG, researchers can determine the conditions under which the causal effect can be estimated
  • DAGs provide guidance on the variables that need to be controlled for or adjusted to obtain an unbiased estimate of the causal effect
  • Techniques such as back-door adjustment and front-door adjustment can be applied based on the DAG structure to estimate causal effects from observational data

Dealing with confounding

  • Confounding occurs when a variable influences both the treatment and the outcome, leading to spurious associations
  • DAGs help in identifying potential confounders by examining the paths between the treatment, outcome, and other variables
  • By adjusting for the appropriate set of confounders, as determined by the DAG, researchers can mitigate the bias introduced by confounding
  • DAGs provide a systematic way to select the minimal sufficient adjustment set for estimating causal effects in the presence of confounding

Mediation analysis

  • Mediation analysis aims to understand the mechanisms through which a treatment affects an outcome by examining intermediate variables (mediators)
  • DAGs can be used to represent the causal relationships among the treatment, mediators, and outcome
  • By analyzing the paths and controlling for appropriate variables based on the DAG, researchers can estimate the direct and indirect effects of the treatment on the outcome
  • DAGs help in identifying the conditions under which mediation analysis can be conducted and guide the selection of appropriate methods for estimating mediation effects

Limitations and extensions of DAGs

  • While DAGs are a powerful tool for causal inference, they have certain limitations and may not be suitable for all causal scenarios
  • Researchers should be aware of these limitations and consider extensions or alternative approaches when necessary
  • Some common limitations and extensions of DAGs include cyclic graphs, time-varying treatments, and latent variables and selection bias

Cyclic graphs

  • DAGs assume acyclicity, meaning that there are no feedback loops or cycles in the causal relationships
  • However, in some real-world systems, there may be reciprocal or cyclic causal relationships between variables
  • Cyclic graphs, such as directed cyclic graphs (DCGs) or feedback models, extend the DAG framework to allow for cycles
  • Analyzing cyclic graphs requires different assumptions and techniques compared to DAGs, and the interpretation of causal effects becomes more complex

Time-varying treatments

  • Standard DAGs assume that the treatment and other variables are measured at a single point in time
  • In many situations, treatments may vary over time, and the causal effects may depend on the timing and sequence of treatments
  • Time-varying treatment models, such as marginal structural models or g-methods, extend DAGs to handle time-varying treatments and confounders
  • These models require additional assumptions and specialized estimation techniques to account for the dynamic nature of the treatment process

Latent variables and selection bias

  • DAGs typically include only observed variables, assuming that all relevant variables are measured and included in the graph
  • However, in practice, there may be unmeasured or latent variables that influence the observed variables and introduce bias
  • Latent variable models, such as structural equation models with latent variables or causal discovery algorithms for latent structures, aim to infer the presence and effects of latent variables
  • Selection bias occurs when the observed sample is not representative of the target population due to non-random selection or missing data
  • DAGs can be extended to represent selection bias by including selection nodes and modeling the selection process explicitly
  • Addressing latent variables and selection bias requires additional assumptions, such as the missing at random (MAR) assumption, and specialized estimation methods, such as inverse probability weighting or multiple imputation