exogenize: Exogenize a graph

View source: R/operations.R

exogenizeR Documentation

Exogenize a graph

Description

Exogenize a graph by removing all ingoing edges to the set of nodes specified (i.e., make the nodes exogenous), as well as joining the parents of the nodes specified to the children of the nodes specified.

Usage

exogenize(cg, nodes)

Arguments

cg

A caugi object of class "DAG".

nodes

A character vector of node names to exogenize. Must be a subset of the nodes in the graph.

Value

A caugi object representing the exogenized graph.

See Also

Other operations: condition_marginalize(), count_dags(), dag_from_pdag(), enumerate_dags(), latent_project(), meek_closure(), moralize(), mutate_caugi(), normalize_latent_structure(), skeleton()

Examples

cg <- caugi(A %-->% B, class = "DAG")
exogenize(cg, nodes = "B") # A, B


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