This function creates a polynomial ring in the indeterminates $s_{(i,j)}$ associated to the covariance matrix of the model plus two new lists of indeterminates:
- The $l_{(i,j)}$ indeterminates consist of regression coefficients associated to the directed edges in the graph.
- The $p_{(i,j)}$ indeterminates in the gaussianRing are the nonzero entries in the covariance matrix of the error terms in the graphical model associated to a mixed graph with bidirected edges.
Note that since version 2.0 of the package, gaussianRing of a directed graph is built as a gaussianRing of a mixed graph with only directed edges, see gaussianRing(MixedGraph).
i1 : G = digraph {{a,{b,c}}, {b,{c,d}}, {c,{}}, {d,{}}}; |
i2 : R = gaussianRing G; |
i3 : gens R o3 = {l , l , l , l , p , p , p , p , s , s , s , s , a,c a,b b,c b,d a,a b,b c,c d,d a,a a,b a,c a,d ------------------------------------------------------------------------ s , s , s , s , s , s } b,b b,c b,d c,c c,d d,d o3 : List |
i4 : covarianceMatrix R o4 = | s_(a,a) s_(a,b) s_(a,c) s_(a,d) | | s_(a,b) s_(b,b) s_(b,c) s_(b,d) | | s_(a,c) s_(b,c) s_(c,c) s_(c,d) | | s_(a,d) s_(b,d) s_(c,d) s_(d,d) | 4 4 o4 : Matrix R <--- R |
i5 : directedEdgesMatrix R o5 = | 0 l_(a,b) l_(a,c) 0 | | 0 0 l_(b,c) l_(b,d) | | 0 0 0 0 | | 0 0 0 0 | 4 4 o5 : Matrix R <--- R |
i6 : bidirectedEdgesMatrix R o6 = | p_(a,a) 0 0 0 | | 0 p_(b,b) 0 0 | | 0 0 p_(c,c) 0 | | 0 0 0 p_(d,d) | 4 4 o6 : Matrix R <--- R |