M = gaussianParametrization(R)
Given a mixed graph $G$ with directed and bidirected edges, let $L$ be the matrix corresponding to the directed edges (see directedEdgesMatrix) and let $W$ be the matrix corresponding to the bidirected edges (see bidirectedEdgesMatrix). Then, the covariance matrix $S$ (see covarianceMatrix) of the random variables in the Gaussian graphical model corresponding to the mixed graph $G$ can be parametrized by the matrix equation $S = (I-L)^{-T}W(I-L)^{-1}$, where $I$ is the identity matrix.
The entry $s_{(i,j)}$ of the covariance matrix can also be written as the sum of all monomials corresponding to treks between vertices $i$ and $j$. See trekSeparation for the definition of a trek. The monomial corresponding to a trek is the product of all parameters associated to the directed and bidirected edges on the trek.
The following example shows how to compute the ideal of the model using the parametrization, which could also be computed using gaussianVanishingIdeal
|
|
|
|
|
|
|
|
|
|
This next example shows how to use the option SimpleTreks to compute a parametrization using simple treks instead of all treks. The resulting covariance matrix has diagonal entries equal to 1. This is giving a parametrization of all correlation matrices of matrices that belong to the model. This formulation is also known as Wright's method of path analysis.
|
|
|
The object gaussianParametrization is a method function with options.