# Support of the adjacency matrix to cliques and separators.

### Description

Convert the support of an undirected, chordal graph into a lists of cliques and separators. When the graph is not chordal, it is triangulated to make it so. The undirected graph may be specified as an adjacency matrix, or by the complement of its support as a matrix with the indices of the adjancency matrix corresponding to absent edges. The function thus caters for the two different types of output from the `sparsify`

-function. The function is meant to preceede the `ridgePchordal`

, as it its output directly feeds into the latter.

### Usage

1 | ```
support4ridgeP(adjMat=NULL, nNodes=NULL, zeros=NULL, verbose=FALSE)
``` |

### Arguments

`adjMat` |
Adjacency matrix of an undirected graph. |

`nNodes` |
Positive |

`zeros` |
A |

`verbose` |
A |

### Details

Essentially, it is a wrapper for the `rip`

-function from the `gRbase`

-package, which takes different input and yields slightly different output. Its main purpose is to mold the input such that it is convenient for the `ridgePchordal`

-function, which provides ridge maximum likelihood estimation of the precision matrix with known support.

### Value

A `list`

-object comprising three slots: 'zeros', 'cliques, 'separators' and 'addedEdges'. The 'zeros'-slot: a `matrix`

with indices of entries of the adjacency matrix that are zero. The matrix comprises two columns, each row corresponding to an entry of the adjacency matrix. The first column contains the row indices and the second the column indices. The specified graph should be undirected and decomposable. If not, it is symmetrized and triangulated. Hence, it may differ from the input 'zeros'. The 'cliques'-slot: a `list`

-object containing the node indices per clique as obtained from the `rip`

-function. The 'separators'-slot: a `list`

-object containing the node indices per clique as obtained from the `rip`

-function. The 'addedEdges'-slot: a `matrix`

with indices of edges that have been added in the triangulation.

### Author(s)

Wessel N. van Wieringen <w.vanwieringen@vumc.nl>.

### References

Lauritzen, S.L. (2004). *Graphical Models*. Oxford University Press.

### See Also

`sparsify`

, `ridgePchordal`

, `rip`

.

### Examples

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ```
# obtain some (high-dimensional) data
p <- 8
n <- 100
set.seed(333)
Y <- matrix(rnorm(n*p), nrow = n, ncol = p)
# create sparse precision
P <- covML(Y)
P[1:3, 6:8] <- 0
P[6:8, 1:3] <- 0
# draw some data
S <- covML(matrix(rnorm(n*p), nrow = n, ncol = p))
# obtain (triangulated) support info
zeros <- which(P==0, arr.ind=TRUE)
supportP <- support4ridgeP(adjMat=adjacentMat(P))
# alternative specification of the support
zeros <- which(P==0, arr.ind=TRUE)
supportP <- support4ridgeP(nNodes=p, zeros=zeros)
# estimate precision matrix with known (triangulated) support
Phat <- ridgePchordal(S, 0.1, zeros=supportP$zeros,
cliques=supportP$cliques, separators=supportP$separators)
``` |