Learn R Programming

caugi (version 1.0.0)

adjustment_set: 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")
)

Value

A character vector of node names representing the adjustment set.

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": Pearl backdoor formula

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

See Also

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

Examples

Run this code
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") # C, A
adjustment_set(cg, "X", "Y", type = "optimal") # K

Run the code above in your browser using DataLab