matrix2graph: Convert matrix to graph

Gamma2graphR Documentation

Convert matrix to graph

Description

Creates a graph object representing the graph structure implied by a parameter matrix.

Usage

Gamma2graph(Gamma, tol = get_large_tol(), check = TRUE)

Sigma2graph(Sigma, tol = get_large_tol(), k = NULL, full = FALSE, check = TRUE)

Theta2graph(Theta, tol = get_large_tol(), k = NULL, full = FALSE, check = TRUE)

partialMatrixToGraph(M)

Arguments

Gamma

Numeric \dxd variogram matrix.

tol

Numeric scalar. Entries in the precision matrix with absolute value smaller than this are considered to be zero.

check

Whether to check the inputs and call ensure_matrix_symmetry_and_truncate_zeros on the outputs.

Sigma

Numeric \dxd or \d1xd1 covariance matrix.

k

NULL if the input/output matrix is \eSigma/\eTheta. Else, an integer between 1 and d indicating the value of k in \eSigmaK, \eThetaK.

full

Logical. If TRUE and !is.null(k), the input/output matrix is a \dxd matrix with the kth row filled with zeros.

Theta

Numeric \dxd or \d1xd1 precision matrix.

M

Partial matrix with NA entries indicating missing edges.

Value

An igraph::graph object.

See Also

Other parameter matrix transformations: Gamma2Sigma(), chi2Gamma(), par2Matrix()


graphicalExtremes documentation built on Nov. 14, 2023, 1:07 a.m.