pc {ILSM}R Documentation

Participation ratio of interconnecting code

Description

Counting participation ratio that the difference in the degree of interconnecting nodes within two subnetworks.

Usage

pc(network.or.subnet_mat1, subnet_mat2 = NULL)

Arguments

network.or.subnet_mat1

Either a multilayer(tripartite) network of 'igraph' class which contains three groups of species and interactions within layers without interactions between each group of species, 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 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.

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.

Value

Print a "pc= ;" and Return a numeric value representing difference in the degree of interconnecting nodes within two subnetworks of multialyer network.

References

Battiston, F., Nicosia, V. & Latora, V. (2014) Structural measures for multiplex networks. Physical Review E, 89, 032804.

Domínguez-García, V., & Kéfi, S. (2024). The structure and robustness of ecological networks with two interaction types. PLOS Computational Biology, 20(1), e1011770.

Guimera, R. & Amaral, L.A.N. (2005) Cartography of complex networks: modules and universal roles. Journal of Statistical Mechanics: Theory and Experiment, 2005, P02001.

Examples


set.seed(15)
d <- build_net(11,15,17,0.2)
pc(d)

md1<-matrix(sample(c(0,1),80,replace=TRUE),8,10)
md2<-matrix(sample(c(0,1),120,replace=TRUE),10,12)
pc(md1,md2)

mdw1<-matrix(sample(c(rep(0,60),runif(60,0,1))),12,10)
mdw2<-matrix(sample(c(rep(0,40),runif(80,0,1))),10,12)
pc(mdw1,mdw2)


[Package ILSM version 1.0.3.1 Index]