The skeleton of a graph is obtained by replacing all directed edges with
undirected edges.
Arguments
- cg
A caugi object. Either a DAG or PDAG.
Value
A caugi object representing the skeleton of the graph (UG).
Details
This changes the graph from any class to an Undirected Graph (UG), also known
as a Markov Graph.
Examples
cg <- caugi(A %-->% B, class = "DAG")
skeleton(cg) # A --- B
#> <caugi object; 2 nodes, 1 edges; simple: TRUE; built: TRUE; ptr=0x5559e5e537b0>
#> graph_class: UG
#> nodes: A, B
#> edges: A---B