Skip to contents

Wraps dagitty::adjustmentSets() and returns the adjustment set as a plain character vector — or NULL if the effect is not identifiable.

Usage

causal_adjustment_set(
  dag,
  exposure,
  outcome,
  type = c("minimal", "canonical", "all"),
  effect = c("direct", "total")
)

Arguments

dag

A dagitty DAG object.

exposure

Character, name of the exposure variable.

outcome

Character, name of the outcome variable.

type

One of "minimal", "canonical", "all"; forwarded to dagitty::adjustmentSets().

effect

One of "direct" or "total"; forwarded to dagitty::adjustmentSets().

Value

A character vector of variable names to condition on, or NULL if no valid set exists.