Description Usage Arguments Value Note References Examples
Compute the maximum likelihood estimate, given certain elements are constrained to zero (e.g., an adjacency matrix). This approach is described in \insertCitehastie2009elements;textualGGMnonreg.
1 | constrained(Sigma, adj)
|
Sigma |
Covariance matrix |
adj |
Matrix with constraints. A zero indicates that element should be constrained to zero. |
A list containing the inverse covariance matrix and the covariance matrix.
The algorithm is written in c++
.
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.