adjustment_set: Compute an adjustment set

View source: R/adjustment.R

adjustment_setR Documentation

Compute an adjustment set

Description

Computes an adjustment set for X -> Y in a DAG.

Usage

adjustment_set(
  cg,
  X = NULL,
  Y = NULL,
  X_index = NULL,
  Y_index = NULL,
  type = c("optimal", "parents", "backdoor")
)

Arguments

cg

A caugi object.

X, Y

Node names.

X_index, Y_index

Optional numeric 1-based indices.

type

One of "parents", "backdoor", "optimal". The optimal option computes the O-set.

Details

Types supported:

  • "parents": \bigcup \mathrm{Pa}(X) minus X \cup Y

  • "backdoor": an inclusion-minimal valid backdoor adjustment set, found in linear time as a minimal d-separator of X and Y in the proper backdoor graph (van der Zander, Liśkiewicz & Textor, 2019). Unlike "parents" (which always conditions on every parent of X), this drops nodes that are not needed to block a backdoor path. Note that minimal is not the same as statistically optimal; use "optimal" for the efficient O-set.

  • "optimal": O-set (only for single x and single y)

Value

A character vector of node names representing the adjustment set.

See Also

Other adjustment: all_adjustment_sets_admg(), all_backdoor_sets(), d_separated(), is_valid_adjustment_admg(), is_valid_backdoor(), minimal_separator()

Examples

cg <- caugi(
  C %-->% X,
  X %-->% F,
  X %-->% D,
  A %-->% X,
  A %-->% K,
  K %-->% Y,
  D %-->% Y,
  D %-->% G,
  Y %-->% H,
  class = "DAG"
)

adjustment_set(cg, "X", "Y", type = "parents") # C, A
adjustment_set(cg, "X", "Y", type = "backdoor") # A
adjustment_set(cg, "X", "Y", type = "optimal") # K


caugi documentation built on Oct. 28, 2026, 1:07 a.m.