is.p.fix: Primal fixability of a treatment variable in a graph.

View source: R/graph-functions.R

is.p.fixR Documentation

Primal fixability of a treatment variable in a graph.

Description

Function to check if a treatment variable is primal fixable in a graph object. If the treatment is primal fixable, then the average causal effect of the treatment on any choice of the outcome in the given graph is always identified.

Usage

is.p.fix(graph, treatment)

Arguments

graph

A graph object generated by the make.graph() function.

treatment

A character string specifying the treatment variable in the graph.

Value

A logical value indicating whether the treatment is primal fixable.

Examples

graph <- make.graph(vertices=c('A','M','L','Y','X'),
bi_edges=list(c('A','Y')),
di_edges=list(c('X','A'), c('X','M'), c('X','L'),
c('X','Y'), c('M','Y'), c('A','M'), c('A','L'), c('M','L'), c('L','Y')))
is.p.fix(graph, 'A')


flexCausal documentation built on March 29, 2026, 5:08 p.m.