Maximum-likelihood Sigma and Theta = Sigma^-1 with zeros for the missing edges by the modified regression algorithm (ESL Alg. 17.1, eqs 17.11-17.19): each node is regressed on its neighbours using the current W.
Examples
S <- matrix(c(10, 1, 5, 4, 1, 10, 2, 6, 5, 2, 10, 3, 4, 6, 3, 10), 4)
A <- matrix(c(0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0), 4)
round(morie_esl_ggm_fit(S, A)$Sigma, 2)
#> [,1] [,2] [,3] [,4]
#> [1,] 10.00 1.00 1.31 4.00
#> [2,] 1.00 10.00 2.00 0.87
#> [3,] 1.31 2.00 10.00 3.00
#> [4,] 4.00 0.87 3.00 10.00
