Learn R Programming

caugi (version 1.0.0)

exogenize: 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)

Value

A caugi object representing the exogenized graph.

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.

See Also

Other operations: condition_marginalize(), latent_project(), moralize(), mutate_caugi(), skeleton()

Examples

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

Run the code above in your browser using DataLab