constrained {GGMnonreg} | R Documentation |
Constrained Precision Matrix
Description
Compute the maximum likelihood estimate, given certain elements are constrained to zero (e.g., an adjacency matrix). This approach is described in Hastie et al. (2009).
Usage
constrained(Sigma, adj)
Arguments
Sigma |
Covariance matrix |
adj |
Matrix with constraints. A zero indicates that element should be constrained to zero. |
Value
A list containing the inverse covariance matrix and the covariance matrix.
Note
The algorithm is written in c++
.
References
Hastie T, Tibshirani R, Friedman J (2009). The elements of statistical learning: data mining, inference, and prediction. Springer Science \& Business Media.
Examples
# data
Y <- ptsd
# estimate graph
fit <- ggm_inference(Y, boot = FALSE)
# constrain to zero
constrained_graph <- constrained(cor(Y), fit$adj)
[Package GGMnonreg version 1.0.0 Index]