unmakeAG {ggm}R Documentation

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.

dag the adjacency matrix of the directed edges.
ug the adjacency matrix of the undirected edges.
bg the adjacency matrix of the bidirected edges.

Author(s)

Mathias Drton

See Also

makeAG

Examples

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

[Package ggm version 1.0.2 Index]