Node_versatility {ILSM}R Documentation

Measuring node versatility of multilayer network

Description

The versatility of nodes is revealed by several centrality measures that have now been applied to multilayer networks, such as Degree, PageRank, Hub, Authority, Katz, Eigenvector, and Closeness centrality.

Usage

Node_versatility(
  network.or.subnet_mat1,
  subnet_mat2 = NULL,
  isDirected1 = TRUE,
  isDirected2 = TRUE,
  type = c("degree", "pagerank", "hub", "authority", "katz", "eigenvector", "closeness",
    "all")
)

Arguments

network.or.subnet_mat1

Either a multilayer(tripartite) network of 'igraph' class which contains interlayer links and without intralayer links, or a numeric matrix(or data.frame) representing interactions between two groups of species. Each row and column of matrix represents single species in the second and first groups of the tripartite network respectively. Elements of matrix are non-zero numbers if the two groups of species are connected, and 0 otherwise.

subnet_mat2

A numeric matrix(or data.frame) representing interactions between two groups of species. Each row and column of matrix represents single species in the second and third groups of the tripartite network respectively. Elements of matrix are non-zero numbers if the two groups of species are connected, and 0 otherwise. If network.or.subnet_mat1 is "igraph", subnet_mat2 defaults to NULL.

isDirected1

Logical. Whether the interaction between the two groups of species in mat1 is unidirectional.Default to TRUE, such as Predation and Herbivory. Otherwise it is bidirectional, such as Mutualism.

isDirected2

Logical. Whether the interaction between the two groups of species in mat2 is unidirectional.Default to TRUE, such as Predation and Herbivory. Otherwise it is bidirectional, such as Mutualism.

type

Character. Including "degree", "pagerank", "hub", "authority", "katz", "eigenvector", "closeness", and "all".

Details

network.or.subnet_mat1 and subnet_mat2

There are two types of network.or.subnet_mat1 that can be processed:

If the type of inputting is data frame or matrix, please make sure the row of network.or.subnet_mat1 and subnet_mat2 correspond with the second group of species that both belong to two subnetworks and interact with other groups of species.

About a network of type "igraph", It can be obtained from the connection matrices of subnetworks by the function igraph_from_matrices.

type

type "degree", "pagerank", "hub", "authority", "katz", "eigenvector", and "closeness" correspond to Degree, PageRank, Hub, Authority, Katz, Eigenvector, and Closeness centrality. type "all" integrates the above centrality.

Value

Return a data frame with the first row "node" for each node of network representing each species.

References

De Domenico, M., Nicosia, V., Arenas, A., & Latora, V. (2015). Structural reducibility of multilayer networks. Nature communications, 6(1), 6864.

De Domenico, M., Solé-Ribalta, A., Omodei, E., Gómez, S., & Arenas, A. (2013). Centrality in interconnected multilayer networks. arXiv preprint arXiv:1311.2906.

De Domenico, M. (2022). Multilayer Networks: Analysis and Visualization. Introduction to muxViz with R. Cham: Springer.

Page, L., Brin, S., Motwani, R., & Winograd, T. (1999). The pagerank citation ranking: Bringing order to the web.

Magnani, M., Micenkova, B., & Rossi, L. (2013). Combinatorial analysis of multiple networks. arXiv preprint arXiv:1303.4986.

Examples


set.seed(12)
d <- build_net(11,22,21,0.2,asmatrices=TRUE)
d
Node_versatility(d[[1]])

MAT<-d
Node_versatility(MAT[[3]],MAT[[4]])
Node_versatility(t(MAT[[3]]),MAT[[4]])
Node_versatility(MAT[[3]],MAT[[4]],type="pagerank")

Node_versatility(MAT[[3]],MAT[[4]],isDirected2=FALSE)




[Package ILSM version 1.0.2 Index]