RepMarBG: Representational Markov equivalence to bidirected graphs.

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/kayvan.R

Description

RepMarBG determines whether a given maximal ancestral graph can be Markov equivalent to a bidirected graph, and if that is the case, it finds a bidirected graph that is Markov equivalent to the given graph.

Usage

1
RepMarBG(amat)

Arguments

amat

An adjacency matrix, or a graph that can be a graphNEL or an igraph object or a vector of length 3e, where e is the number of edges of the graph, that is a sequence of triples (type, node1label, node2label). The type of edge can be "a" (arrows from node1 to node2), "b" (arcs), and "l" (lines).

Details

RepMarBG looks for presence of an unshielded non-collider V-configuration in graph.

Value

A list with two components: verify and amat. verify is a logical value, TRUE if there is a representational Markov equivalence and FALSE otherwise. amat is either NA if verify == FALSE or the adjacency matrix of the generated graph, if verify == TRUE. In this case it consists of 4 different integers as an ij-element: 0 for a missing edge between i and j, 1 for an arrow from i to j, 10 for a full line between i and j, and 100 for a bi-directed arrow between i and j. These numbers are added to be associated with multiple edges of different types. The matrix is symmetric w.r.t full lines and bi-directed arrows.

Author(s)

Kayvan Sadeghi

References

Sadeghi, K. (2011). Markov equivalences for subclasses of loopless mixed graphs. Submitted, 2011.

See Also

MarkEqMag, MarkEqRcg, RepMarDAG, RepMarUG

Examples

1
2
H<-matrix(c(0,10,0,0,10,0,0,0,0,1,0,100,0,0,100,0),4,4)
RepMarBG(H)

Example output

Loading required package: igraph

Attaching package: 'igraph'

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union


Attaching package: 'ggm'

The following object is masked from 'package:igraph':

    pa

$verify
[1] FALSE

$amat
[1] NA

ggm documentation built on March 26, 2020, 7:49 p.m.

Related to RepMarBG in ggm...