Description Usage Arguments Value Note References Examples
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.
1 | constrained(Sigma, adj)
|
Sigma |
Covariance matrix |
adj |
An adjacency matrix that encodes the constraints, where a zero indicates that element should be zero. |
A list containing the following:
Theta: Inverse of the covariance matrix (precision matrix), that encodes the conditional (in)dependence structure.
Sigma: Covariance matrix.
wadj: Weighted adjacency matrix, corresponding to the partial correlation network.
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
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.