Solving identification conditioning problems graphically

Greenland and Pearl (2017) [link] offer a fully graphical strategy based on “graph moralization” as a way to figure out conditioning strategies for causal identification problems using directed acyclic graphs (DAGs). I don’t see this presented as often as it should, given how powerful it is and, also, how incredibly easy and intuitive it is. The graph moralization approach is how I teach conditioning strategies using DAGs (e.g., [link]).

The way I teach it is like this:

  1. Start with the DAG that represents the actual data-generating process (DGP).
  2. Next define a “target intervention graph” that represents, in DAG form, an ideal experimental DGP for the causal effects that you want to identify.
  3. Apply the graph moralization rules per Greenland and Pearl to check the implications of conditioning on different variables in the DAG for the actual DGP.
  4. You have identified a sufficient conditioning set when you have gotten the actual DGP DAG to look like the target intervention graph through conditioning and moralization. Note that for any given problem, there may be more than one conditioning set that is sufficient.

The graph moralization rules are as follows, quoting Greenland and Pearl:

Conditioning on a variable C in a DAG can be represented by creating a new graph from the original graph to represent constraints on relations within levels (strata) of C implied by the constraints imposed by the original graph. This conditional graph can be found by the following sequence of operations, sometimes called graphical moralization.

  1. If C is a collider, join (marry) all pairs of parents of C by undirected arcs.
  2. Similarly, if A is an ancestor of C and a collider, join all pairs of parents of A by undirected arcs.
  3. Erase C and all arcs connecting C to other variables.

(Greenland and Pearl, 2017, pp. 3-4)

Recently, @analisereal posed an identification conditioning problem:

We can apply the recipe outlined above. The DAG in the tweet represents the actual DGP. The target intervention graph needs to represent “a joint intervention of X1 and X2 on Y.” This would be as follows:

To see what happens when we condition on the available controls, we would apply the graph moralization rules. Conditioning on Z2 would require that we apply rules 1 and 3, yielding: So we are not quite there with respect to our target graph. That said, the graph that results here is interesting, because it does capture a DGP that characterizes two conditionally independent effects of X1 and X2 on Y, and thus it does capture the effects of a joint intervention of X1 and X2 on Y in circumstances in which Z2 is held fixed. It’s just that the mediation pathway between X1 and Y is obscured relative to our target graph.

Conditioning only on Z1 (and not Z2) would require that we apply rule 3, yielding: Here, we have a DGP that is clean for the effect of X1 on Y, but the effect of X2 on Y is confounded by a backdoor path.

Conditioning on both Z1 and Z2 results in the following: The variable U is exogenous, and so we can remove it from the graph. This gets us to our target intervention graph, and represents a solution to the problem.

Now, when effects are heterogeneous with respect to conditioning variables, then we should have a way to remind ourselves that we need to marginalize conditional effect estimates over values of the conditioning variables. This would be necessary in order to get to a population-level estimate of the effects on the target intervention graph. The way I like to do it is to write the conditioning arguments next to the conditional graph, like this: Writing out “Z1=z1, Z2=z2” by the graph makes it clear that these are conditional relationships on the actual DGP, and that marginalization (with respect to z1 and z2) would be needed to get from this to the effects that target intervention graph represents in the population.


Methods for situating a scholar in their field

I am putting these notes here to remind me of steps and also in case others are curious about doing something similar.

Suppose we want to situate a scholar in their field, for example as part of a tenure review case. One way to do that is to look at the scholar’s papers and see who they are citing:

  1. Go to their Google scholar profile and pull up their papers. Choose some of their most cited papers (reflecting how others see the scholar’s contributions) and some of their most recent papers (reflecting their current thinking).

  2. Construct the network of people that the scholar references in their most prominent work. A low-tech way to do this is to copy/paste bibliographies from the papers into to put the bibliographies into machine readable format (e.g., bibtex). I like to tag the entries from each paper’s bibliography by the date of the paper’s publication (e.g., by adding a custom field to the bibtex file) so that I can sort and see how the scholar’s reference base has changed over time. Compile the different bibliographies into a library in a reference manager. If you keep duplicate entries you get a sense of the scholar’s key points of reference. A higher-tech way to do this is to use the Connected Papers app. You can look at the graph to find well-cited work that the scholar tends to reference.

  3. Pare down the list to seminal contributions. E.g., keep only entries from relevant general interest and field journals that are highly cited.

Now some analyses:

First, who appears most often in the library? What does the work of these primary referents represent in the literature and how does the current scholar’s work relate?

Second, whose work is being referenced at different times over the course of the scholar’s career (I do this using the custom field described above)? What does this say about how the scholar’s work has evolved alongside the reference literature?

As far as I know, the steps above are not as well-automated as methods to see who else is citing the scholar’s work (there are numerous tools to do that, like the “scholar” package in R). Would love to see someone do it (and welcome any suggestions below).


Readings on statistical discrimination and inefficiency

A tweet by Sarah Jacobson prompted a few discussion threads on current perspectives on statistical discrimination and efficiency/inefficiency. Here is the original tweet:

I have collected references to some of the papers that discussants mentioned as providing more refined takes on the original Arrow and Aigner-Cain analyses:

  • Lundberg, Shelly J., and Richard Startz. “Private discrimination and social intervention in competitive labor market.” The American Economic Review 73.3 (1983): 340-347.
  • Schwab, Stewart. “Is statistical discrimination efficient?.” The American Economic Review 76.1 (1986): 228-234.
  • Coate, Stephen, and Glenn C. Loury. “Will affirmative-action policies eliminate negative stereotypes?.” The American Economic Review (1993): 1220-1240.
  • Bohren, J. Aislinn, et al. Inaccurate statistical discrimination. No. w25935. National Bureau of Economic Research, 2019.
  • Lang, Kevin, and Ariella Kahn-Lang Spitzer. “Race discrimination: An economic perspective.” Journal of Economic Perspectives 34.2 (2020): 68-89.
  • Komiyama, Junpei, and Shunya Noda. “On Statistical Discrimination as a Failure of Social Learning: A Multi-Armed Bandit Approach.” arXiv preprint arXiv:2010.01079 (2020).
  • Fosgerau, Mogens and Sethi, Rajiv and Weibull, Jorgen W., Costly Screening and Categorical Inequality (April 21, 2021). Available at SSRN: or

Design-Based Inference for Spatial Experiments with Interference

Excited to share “Design-Based Inference for Spatial Experiments with Interference”, joint with Peter M. Aronow and Ye Wang: arxiv

In settings with complex spatial effects and interference, the paper defines a type of marginal effect, the “average marginalized response,” that has a clear interpretation and can be identified with a spatial experiment and a simple contrast.

It took time to work out details for robust inference, and finally got there with Ye working out reasonable conditions that justify the spatial HAC variance estimator, and then by connecting to a breakthrough CLT result from Ogburn et al. (2020; arxiv link).

We are working on the public release of the R package and also a more didactic paper that walks through applications. Stay tuned for those.


Using pre-analysis plans to learn better and to learn together

Below is a Twitter thread in which I offer a perspective from my experience through EGAP ( on how to make effective use of pre-analysis plans and also research designs. The basic idea is that your research design and pre-analysis plan should serve as the basis of a discussion in which you can refine your design and analysis and gain buy-in from skeptics. A research design or pre-analysis plan that is never discussed publicly before it is implemented is a huge missed opportunity.

The thread was in response to a paper by Duflo et al. (linked in the thread) who focus mostly on pre-analysis plans as ways to bind yourself, without giving much consideration to the idea of using them as the basis of having an ex ante conversation about the research.

The thread is here: