criticality {NetworkRiskMeasures} | R Documentation |
Criticality of the vertices
Description
The criticality of a vertex measures its impact
on its neighbors if it defaults. It is basically the rowSums
of the impact_matrix
.
Usage
criticality(
exposures,
buffer,
binary = FALSE,
exposure_type = c("assets", "liabilities", "impact", "vulnerability")
)
Arguments
exposures |
an adjacency |
buffer |
a numeric vector with the capital buffer for each vertex.
Values should be in the same row/column order as the network of bilateral exposures. The
buffer is not needed if |
binary |
if |
exposure_type |
character vector indicating the type of the bilateral exposures. It can be
an |
Value
The function returns a (named) vector with the criticality for each vertex.
Examples
# Creating example data
## Assets Matrix (bilateral exposures)
assets_matrix <- matrix(c(0, 10, 3, 1, 0, 2, 0, 3, 0), ncol = 3)
rownames(assets_matrix) <- colnames(assets_matrix) <- letters[1:3]
## Capital Buffer
buffer <- c(a = 2, b = 5, c = 2)
# Criticality
criticality(assets_matrix, buffer)