powered by
A DAG can be represented as a triangular matrix of regression coefficients.
dag2edge_matrix(object, out = 1)edge_matrix2dag(edge_matrix)
edge_matrix2dag(edge_matrix)
A graph, either an igraph object or an adjacency matrix.
Format of the output, can be 1, 2, 3 or 4.
Lower triangular matrix representing a dag
g <- dag(~x2|x1 + x3|x1:x2 + x4|x3) dag2edge_matrix(g, out=1) dag2edge_matrix(g, out=2) dag2edge_matrix(g, out=3) dag2edge_matrix(g, out=4) d2 <- dag(~c|a:b+d:c) dag2edge_matrix(d2)
Run the code above in your browser using DataLab