constrained: Precision Matrix with Known Graph

Description Usage Arguments Value Note References Examples

View source: R/constrained.R

Description

Compute the maximum likelihood estimate of the precision matrix, given a known graphical structure (i.e., an adjacency matrix). This approach was originally described in "The Elements of Statistical Learning" \insertCite@see pg. 631, @hastie2009elementsGGMnonreg.

Usage

1
constrained(Sigma, adj)

Arguments

Sigma

Covariance matrix

adj

An adjacency matrix that encodes the constraints, where a zero indicates that element should be zero.

Value

A list containing the following:

Note

The algorithm is written in c++, and should scale to high dimensions.

Note there are a variety of algorithms for this purpose. Simulation studies indicated that this approach is both accurate and computationally efficient \insertCite@HFT therein, @emmert2019constrainedGGMnonreg

References

\insertAllCited

Examples

1
2
3
4
5
6
7
8
# data
Y <- ptsd

# estimate graph
fit <- ggm_inference(Y, boot = FALSE)

# constrain to zero
constrained_graph <- constrained(cor(Y), fit$adj)

donaldRwilliams/GGMnonreg documentation built on Nov. 13, 2021, 9:57 a.m.