graphicalExtremes (version 0.1.0)

mst_HR: Fitting of Huesler--Reiss minimum spanning tree

Description

Fits the Huesler--Reiss minimum spanning tree, where the edge weights are are the negative maximized log-likelihoods of the bivariate Huesler--Reiss distributions. See eng2019;textualgraphicalExtremes for details.

Usage

mst_HR(data, p = NULL, cens = FALSE)

Value

List consisting of:

  • tree: Graph object from igraph package. The fitted minimum spanning tree.

  • Gamma: Numeric \(d\times d\) estimated variogram matrix \(\Gamma\) corresponding to the fitted minimum spanning tree.

Arguments

data

Numeric matrix of size \(n\times d\), where \(n\) is the number of observations and \(d\) is the dimension.

p

Numeric between 0 and 1 or NULL. If NULL (default), it is assumed that the data are already on multivariate Pareto scale. Else, p is used as the probability in the function data2mpareto to standardize the data.

cens

Logical. If true, then censored likelihood contributions are used for components below the threshold. By default, cens = FALSE.

References

Examples

Run this code
## Fitting a 4-dimensional HR MST tree

my_graph <- igraph::graph_from_adjacency_matrix(
  rbind(c(0, 1, 0, 0),
        c(1, 0, 1, 1),
        c(0, 1, 0, 0),
        c(0, 1, 0, 0)),
  mode = "undirected")
n <- 100
Gamma_vec <- c(.5,1.4,.8)
complete_Gamma(Gamma = Gamma_vec, graph = my_graph)  ## full Gamma matrix

set.seed(123)
my_data <- rmpareto_tree(n, "HR", tree = my_graph, par = Gamma_vec)
my_fit <- mst_HR(my_data, p = NULL, cens = FALSE)

Run the code above in your browser using DataCamp Workspace