Learn R Programming

graphicalExtremes (version 0.2.0)

Gamma2graph: Transformation of matrix to graph object

Description

Transforms a \(\Gamma\) or \(\Theta\) matrix to an igraph::graph object for the corresponding Huesler--Reiss extremal graphical model.

Usage

Gamma2graph(Gamma, tol = get_large_tol())

Theta2graph(Theta, tol = get_large_tol())

Value

Graph object from igraph package. An undirected graph.

Arguments

Gamma

Numeric \(d \times d\) variogram matrix.

tol

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

Theta

Numeric \(d \times d\) precision matrix.

See Also

get_large_tol()

Other MatrixTransformations: Gamma2Sigma(), Gamma2Theta(), Sigma2Gamma(), Theta2Gamma()

Examples

Run this code
Gamma <- cbind(
  c(0, 1.5, 1.5, 2),
  c(1.5, 0, 2, 1.5),
  c(1.5, 2, 0, 1.5),
  c(2, 1.5, 1.5, 0)
)

Gamma2graph(Gamma)

Run the code above in your browser using DataLab