12
$\begingroup$

I see people using these DAGs a lot in articles (e.g. this vignette). Are these kinds graphs only serving purposes of aesthetics and visualizations representations? Or do these graphs actually have some statistical purpose?

I was just wondering because in fields like network analysis, people perform computation analysis on these graphs (ex: shortest path algorithm for travelling salesman). But in statistics, it seems like DAGs are mainly use for showing relationships between treatments and outcomes? Are there computations involved here?

$\endgroup$
1

3 Answers 3

18
$\begingroup$

DAGs are used for much more than visualization

Expressing the (causal) relationships between variables as DAGs allows employing graphical criteria for finding answers to statistical or causal questions.

Example: checking the validity of an adjustment set

Certainly one of the most prominent use-cases is that of finding valid adjustment sets. The DAG formulation allows one to check the suitability of an adjustment set when estimating the effect of $X_s \to X_t$ (source $s$ to target $t$) given variables $X = (X_1,\dots,X_d)$ and a candidate adjustment set $X_A \subset X$. Let $B_\mathcal{G}$ be the binary adjacency matrix of a graph $\mathcal{G}$ encoding the existence of causal edges between the elements of $X$. $\left(B_\mathcal{G}\right)_{i,j} = 1$ if an edge from $X_i$ to $X_j$ exists in $\mathcal{G}$ and $0$ otherwise. We can now use this representation to make sure that

1. No controlling for colliders. No $X_j \in X_A$ should be a descendant of $X_s$. Using a graphical criterion, we can check if $\left(\sum_{i=1}^d B_\mathcal{G}^i\right)_{s,j}=0$ for all $X_j\in X_A$.

2. No open backdoor paths. After removing all edges connected to any $X_j\in X_A$ as well as outgoing edges from $X_s$, there should be no more nodes from which there is a directed path to $X_s$ and to $X_t$. Let $\bar{B}_\mathcal{G}$ be a version of $B_\mathcal{G}$ with all incoming and outgoing edges to nodes $X_j \in X_A$, and all outgoing edges from $X_s$ removed. Let further $\boldsymbol{\bar{B}} =\left(\sum_{i=1}^{d}\bar{B}_\mathcal{G}^i\right)$. We can now check if $\boldsymbol{\bar{B}}_{j,s}\boldsymbol{\bar{B}}_{j,t}=0$ for all $j \in 1,\dots d$.

(There may be valid adjustment sets that don't pass this test, but any adjustment passing it is valid.)

Summary

DAGs are absolutely used for computations and are by no means only a tool for visualization.

$\endgroup$
7
$\begingroup$

I would say that generally DAGs are used as an explanatory tool rather than an estimation tool, so you rarely see them used for direct statistical purposes. However, while they are not the same, DAGs and path model plots have very similar features:

  • Model relationships between variables with arrows pointing to directionality of the relationship.
  • Boxes that indicate some variable of interest.
  • Have assumptions of the endogeneity/exogeneity of the variables.

They are dissimilar because:

  • While DAGs are distribution free, the classic path analysis/SEM assumes normality and linearity.
  • While DAGs use unidirectional arrows, path analyses can include double headed arrows to model covariance structures.
  • DAGs only explain the causal relationships, whereas path analyses provide estimates of the regression paths between variables to test some theory with actual data.

So in some sense DAGs are kind of used in the structural equation modeling world, but not in the same ways. An example of a path analysis is shown below from this post on SO.. You can see some of the similarities and differences described earlier.

enter image description here

On a side note, that's a cool package. Thanks for sharing.

$\endgroup$
4
$\begingroup$

In ecology and conservation, graphs are very commonly used to model animal dispersal, with the nodes representing actual locations in a landscape. I'm not sure I've seen a published real-world example, but it would be perfectly reasonable to use a directed acyclic graph to model something like a wildlife migration. Imagine a population trying to go from point A to point B, with multiple possible routes, including some that meet or branch. You can calculate things like the probability any particular nodes are visited, the expected number of individuals going through nodes, the expected time to reach a node, etc. If absorption is included, then you can also calculate things like the probability of survival and the expected number of individuals to survive. Add multiple states of absorption, and you can calculate the probability of mortality for different causes. This information provides managers a way to identify priority areas/paths/actions for conservation (i.e., what gives us the best bang for the buck for investing money/resources).

The book “Finite Markov Chains” by Kemeny and Snell includes a bunch of these calculations using absorbing Markov chains, and I've implemented them (and others) into the samc R package. Here's a table of the various statistical calculations the package can do: link. My package documentation does tend to focus on spatial ecological applications, but it can be used for anything really. It also tends to focus on building graphs from raster data, but directly inputting graphs as a matrix is possible (eventually, I plan to add support for igraph inputs).

Off the top of my head, hydrological modeling is another real-world application of these types of calculations; I think it makes perfect sense to think of river systems as DAGs. I could see someone modeling water inputs (e.g., rain) and outputs (e.g., city usage, farm usage, etc) to make predictions about downstream events like flooding.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.