Given a graph
and a (partial) variogram matrix Gamma
, returns a full
variogram matrix that agrees with Gamma
in entries corresponding to edges
of graph
and whose corresponding precision matrix, obtained by
Gamma2Theta()
, has zeros in entries corresponding to non-edges of graph
.
For results on the existence and uniqueness of this completion, see
Hentschel et al. (2022)
.
Arguments
- Gamma
Numeric \(d \times d\) variogram matrix.
- graph
NULL
origraph::graph
object. IfNULL
, the graph is implied by non-edge entries inGamma
beingNA
. Must be connected, undirected.- ...
Further arguments passed to
complete_Gamma_general_split()
ifgraph
is not decomposable
Details
If graph
is decomposable, Gamma
only needs to be specified on
the edges of the graph, other entries are ignored.
If graph
is not decomposable, the graphical completion algorithm requires
a fully specified (but non-graphical) variogram matrix Gamma
to begin with.
If not initial completion is provided, the function edmcr::npf()
can be used to compute one. The package edmcr
might need to be installed
manually from GitHub!
References
Hentschel M, Engelke S, Segers J (2022). “Statistical Inference for Hüsler-Reiss Graphical Models Through Matrix Completions.” doi:10.48550/ARXIV.2210.14292 , https://arxiv.org/abs/2210.14292.
See also
Other matrix completion related topics:
complete_Gamma_decomposable()
,
complete_Gamma_general()
,
complete_Gamma_general_demo()
,
complete_Gamma_general_split()
Examples
## Block graph:
Gamma <- rbind(
c(0, .5, NA, NA),
c(.5, 0, 1, 1.5),
c(NA, 1, 0, .8),
c(NA, 1.5, .8, 0)
)
complete_Gamma(Gamma)
#> [,1] [,2] [,3] [,4]
#> [1,] 0.0 0.5 1.5 2.0
#> [2,] 0.5 0.0 1.0 1.5
#> [3,] 1.5 1.0 0.0 0.8
#> [4,] 2.0 1.5 0.8 0.0
## Alternative representation of the same completion problem:
my_graph <- igraph::graph_from_adjacency_matrix(rbind(
c(0, 1, 0, 0),
c(1, 0, 1, 1),
c(0, 1, 0, 1),
c(0, 1, 1, 0)
), mode = "undirected")
Gamma_vec <- c(.5, 1, 1.5, .8)
complete_Gamma(Gamma_vec, my_graph)
#> [,1] [,2] [,3] [,4]
#> [1,] 0.0 0.5 1.5 2.0
#> [2,] 0.5 0.0 1.0 1.5
#> [3,] 1.5 1.0 0.0 0.8
#> [4,] 2.0 1.5 0.8 0.0
## Decomposable graph:
G <- rbind(
c(0, 5, 7, 6, NA),
c(5, 0, 14, 15, NA),
c(7, 14, 0, 5, 5),
c(6, 15, 5, 0, 6),
c(NA, NA, 5, 6, 0)
)
complete_Gamma(G)
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] 0.0 5.0 7 6 9.6
#> [2,] 5.0 0.0 14 15 17.4
#> [3,] 7.0 14.0 0 5 5.0
#> [4,] 6.0 15.0 5 0 6.0
#> [5,] 9.6 17.4 5 6 0.0
## Non-decomposable graph:
G <- rbind(
c(0, 5, 7, 6, 6),
c(5, 0, 14, 15, 13),
c(7, 14, 0, 5, 5),
c(6, 15, 5, 0, 6),
c(6, 13, 5, 6, 0)
)
g <- igraph::make_ring(5)
complete_Gamma(G, g)
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] 0.00000 5.000000 12.723425 10.37104 6.000000
#> [2,] 5.00000 0.000000 14.000000 12.72342 9.676194
#> [3,] 12.72342 14.000000 0.000000 5.00000 9.676194
#> [4,] 10.37104 12.723425 5.000000 0.00000 6.000000
#> [5,] 6.00000 9.676194 9.676194 6.00000 0.000000