Learn R Programming

ggm (version 1.0.4)

unmakeAG: Ancestral Graph components

Description

Splits the adjacency matrix of an ancestral graph into undirected and bidirected components.

Usage

unmakeAG(mag)

Arguments

mag
a square matrix, with dimnames, representing an ancestral graph.

Value

  • It is the inverse of makeAG. It returns the following components.
  • dagthe adjacency matrix of the directed edges.
  • ugthe adjacency matrix of the undirected edges.
  • bgthe adjacency matrix of the bidirected edges.

See Also

makeAG

Examples

Run this code
ag <- makeAG(ug=UG(~y0*y1), dag=DAG(y4~y2, y2~y1), bg=UG(~y2*y3+y3*y4))
unmakeAG(ag)

Run the code above in your browser using DataLab