Macaulay2 » Documentation
Packages » GraphicalModels :: gaussianRing(MixedGraph)
next | previous | forward | backward | up | index | toc

gaussianRing(MixedGraph) -- ring of Gaussian correlations of a graphical model coming from a mixed graph

Synopsis

Description

This function accepts a mixed graph as input. The outputted ring contains the indeterminates $s_{(i,j)}$ associated to the covariance matrix of the model plus two or three new lists of indeterminates depending on the type of edges of the graph:

- The $k_{(i,j)}$ indeterminates in the gaussianRing are the nonzero entries in the concentration matrix in the graphical model associated to the undirected graph.

- 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.

Mixed graphs in this package can be of two different types depending on their edges:

Directed and bidirected edges: two new lists of indeterminates. For each directed edge $i \to j$ in the mixed graph there is an indeterminate, denoted by default $l_{(i,j)}$, corresponding to the associated direct causal effect parameter in the model. For each bidirected edge $i$<->$j$ there is an indeterminate, denoted by default $p_{(i,j)}$, corresponding to the associated noise parameter. Finally, for each node $i$, there is an indeterminate $p_{(i,i)}$.

i1 : G = mixedGraph(digraph {{b,{c,d}},{c,{d}}},bigraph {{a,d}})

o1 = MixedGraph{Bigraph => Bigraph{a => {d}}   }
                                   d => {a}
                Digraph => Digraph{b => {c, d}}
                                   c => {d}
                                   d => {}
                Graph => Graph{}

o1 : MixedGraph
i2 : R = gaussianRing G

o2 = R

o2 : PolynomialRing
i3 : gens R

o3 = {l   , l   , l   , p   , p   , p   , p   , p   , s   , s   , s   , s   ,
       b,c   b,d   c,d   a,a   b,b   c,c   d,d   a,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 0 0       0       |
     | 0 0 l_(b,c) l_(b,d) |
     | 0 0 0       l_(c,d) |
     | 0 0 0       0       |

             4      4
o5 : Matrix R  <-- R
i6 : bidirectedEdgesMatrix R

o6 = | p_(a,a) 0       0       p_(a,d) |
     | 0       p_(b,b) 0       0       |
     | 0       0       p_(c,c) 0       |
     | p_(a,d) 0       0       p_(d,d) |

             4      4
o6 : Matrix R  <-- R

Undirected, directed and bidirected edges: three new lists of indeterminates. Besides the two already described above, undirected edges are dealt with in the same way as in gaussianRing applied to a graph, with the corresponding indeterminates being $k_{(i,j)}$ by default.

Only loopless mixed graphs are accepted and they must have a vertex ordering compatible with partitionLMG. For more details about loopless mixed graphs, see the paper: Kayvan Sadeghi and Steffen Lauritzen, Markov properties for mixed graphs, Bernoulli, 20 (2014), no 2, 676-696.

Be aware that several functions in this package that accept mixed graphs are still not implemented for mixed graphs with undirected edges: gaussianParametrization, gaussianVanishingIdeal, trekIdeal, trekSeparation, identifyParameters.

i7 : G = mixedGraph(digraph {{1,3},{2,4}},bigraph {{3,4}},graph {{1,2}});
i8 : R = gaussianRing G

o8 = R

o8 : PolynomialRing
i9 : gens R

o9 = {k   , k   , k   , l   , l   , p   , p   , p   , s   , s   , s   , s   ,
       1,1   2,2   1,2   1,3   2,4   3,3   4,4   3,4   1,1   1,2   1,3   1,4 
     ------------------------------------------------------------------------
     s   , s   , s   , s   , s   , s   }
      2,2   2,3   2,4   3,3   3,4   4,4

o9 : List
i10 : covarianceMatrix R

o10 = | s_(1,1) s_(1,2) s_(1,3) s_(1,4) |
      | s_(1,2) s_(2,2) s_(2,3) s_(2,4) |
      | s_(1,3) s_(2,3) s_(3,3) s_(3,4) |
      | s_(1,4) s_(2,4) s_(3,4) s_(4,4) |

              4      4
o10 : Matrix R  <-- R
i11 : undirectedEdgesMatrix R

o11 = | k_(1,1) k_(1,2) |
      | k_(1,2) k_(2,2) |

              2      2
o11 : Matrix R  <-- R
i12 : directedEdgesMatrix R

o12 = | 0 0 l_(1,3) 0       |
      | 0 0 0       l_(2,4) |
      | 0 0 0       0       |
      | 0 0 0       0       |

              4      4
o12 : Matrix R  <-- R
i13 : bidirectedEdgesMatrix R

o13 = | p_(3,3) p_(3,4) |
      | p_(3,4) p_(4,4) |

              2      2
o13 : Matrix R  <-- R

See also

Ways to use this method: