Statistics & probability

Causal DAG adjustment set calculator with backdoor path certificates

Find minimal observed adjustment sets satisfying the classical backdoor criterion in an entered causal DAG.

Your numbers

Valid JSON; preserve the shown array or object structure.
Valid JSON; preserve the shown array or object structure.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

A directed acyclic graph records assumptions about which variables can directly influence others. The adjustment question asks whether conditioning on selected observed variables blocks noncausal paths from an exposure to an outcome.

THE FORMULAValidate directed acyclic graph. For single exposure X,outcome Y and observed eligible adjustment nodes, enumerate subsets excluding X,Y and descendants of X (standard backdoor criterion). Remove outgoing arrows from X to form backdoor graph. Enumerate simple X-Y paths and test d-connection: a noncollider must not be in Z; every collider must have itself or a directed descendant in Z. Z valid if no backdoor path remains open. Return inclusion-minimal valid sets; for each invalid candidate supply one open path with collider statuses. Scope is sufficient standard-backdoor sets, not all generalized adjustment sets; exclude latent nodes from candidates but retain them on paths.

A worked example

With the prefilled inputs, minimalAdjustmentSets = [[0]]. Zero-based node labels. Only classical backdoor adjustment, observed nondescendants eligible.

Good to know

A witness is a path in the ancestral moral graph after treatment-outgoing-edge removal, not necessarily an original directed graph path. Classical backdoor criterion only.

Start with a causal hypothesis

A directed acyclic graph records assumptions about which variables can directly influence others. The adjustment question asks whether conditioning on selected observed variables blocks noncausal paths from an exposure to an outcome.

The graph is not verified by drawing it. An omitted common cause or an incorrectly oriented arrow can change the required adjustment set, even when the calculator checks every path correctly.

Backdoor confounding forkA common cause creates a backdoor pathZXYadjust for ZX ← Z → Y is blocked by {Z}Graph assumptions are supplied, not learned from data.
Scroll across to see the full diagram.
In the supplied DAG Z→X,Z→Y,X→Y, adjusting for Z blocks the noncausal fork X←Z→Y. The minimal standard-backdoor set is{Z}.

Compare with the Discrete Bayesian network inference calculator from conditional tables. Identify sufficient covariate adjustment sets from a causal graph without conditional probability tables; Bayesian network inference computes observational probabilities and does not establish causal identification.

Choose exposure and outcome

Zero-based node labels. Only classical backdoor adjustment, observed nondescendants eligible.Select one exposure and one outcome, then distinguish measured candidate covariates from unmeasured variables. Latent variables remain on paths but cannot be selected as observed adjustment controls.

The supported standard-backdoor search excludes the exposure, outcome and exposure descendants from adjustment candidates. More general adjustment criteria can admit other sets and are outside this explicitly narrower rule. The input has two to twelve labeled nodes and a list of distinct directed edges. Node labels are zero-based integers; separately list any unobserved nodes. Treatment and outcome must be distinct observed nodes. The graph must be acyclic, so a feedback relationship cannot be encoded by adding both directed edges and expecting ordinary backdoor reasoning to apply. The graph expresses assumptions about the data-generating process. A returned adjustment set is sufficient under those assumptions and the classical criterion, rather than evidence that the entered graph has been learned or verified from observational data.

Find noncausal paths

For the standard backdoor check, remove arrows leaving the exposure and inspect paths connecting it with the outcome. These are the paths that adjustment must block without relying on the causal arrows being estimated.

At a noncollider, conditioning blocks a path. At a collider, the path is already blocked unless that collider or one of its descendants is conditioned on; this is why adding more controls can introduce bias.

Read minimal sets as alternatives

An inclusion-minimal adjustment set has no removable variable while retaining the required blocking property. Different minimal sets can exist, and their sample-precision or measurement tradeoffs need not be equal.

Minimal does not mean numerically smallest under every definition. A larger inclusion-minimal set can coexist with a smaller alternative if none of its own members can be removed without opening a path.

A common-cause example

For arrows Z→X,Z→Y and X→Y, the path X←Z→Y is open before adjustment. Conditioning on Z blocks that path, so{Z} is the minimal standard-backdoor set.

Conditioning on the exposure itself is not an answer to this question. The target remains the causal contrast for X, and the adjustment variables supply the comparison needed to separate it from the common cause.

A collider warning

Consider X←A→C←B→Y, together with the causal arrow X→Y. The noncausal path is blocked at collider C when no variable on that collider branch is conditioned on.

Adjusting for C opens the path and can create an association between the exposure and the outcome. The path certificate shows that local arrow pattern so a rejected candidate is explained rather than merely marked invalid.

Keep graph validity separate from effect estimation

A sufficient set supplies a graphical identification argument under the stated assumptions. It does not calculate an effect size, select a correct outcome model or guarantee adequate overlap in the observed data.

After choosing a defensible adjustment set, estimation still needs measured covariates, suitable modeling and uncertainty assessment. A finite graph certificate is a useful audit trail for those later decisions. The search excludes descendants of treatment and enumerates subsets of the remaining observed candidates. To test a candidate, it removes arrows leaving treatment, restricts to ancestors of treatment, outcome and that candidate, marries parents and checks separation in the resulting undirected moral graph. Only inclusion-minimal successful subsets are retained. An empty adjustment set is meaningful and differs from a list containing no valid sets. The unadjusted path output belongs to the ancestral moral graph; it is not necessarily a sequence of edges from the original causal DAG. Generalized adjustment, mediation identification and instrumental-variable discovery are outside this page. A witness is a path in the ancestral moral graph after treatment-outgoing-edge removal, not necessarily an original directed graph path. Classical backdoor criterion only.

A few questions, answered

Does the calculator learn arrows from my data?

No. You supply the causal graph, and the result is conditional on its assumptions.

Why can adding a covariate make adjustment invalid?

Conditioning on a collider or its descendant can open a previously blocked noncausal path.

Can a latent variable appear in an adjustment set?

No. It remains in path analysis but is unavailable as an observed control.

Are these all possible generalized adjustment sets?

No. This bounded search uses the stated standard-backdoor criterion and should not claim broader completeness.

Find your calculator

Start typing to explore the library.