cpness {econetwork} | R Documentation |
Core-peripheriness measure
Description
Computation of the cpness measure for a bipartite graph/network
Usage
cpness(web, type=c("automatic","binary","integer","float"), plot=TRUE, fastplot=FALSE)
Arguments
web |
A |
type |
Type of matrix. This should be (an unambiguous
abbreviation of) one of |
plot |
Plot the matrix reordered according to the core-periphery
partitioning. |
fastplot |
If |
Details
In a matrix displaying a core-periphery structure, there is a species ordering (i.e. an ordering in rows and columns) such that interactions are distributed in an L-shape. This L-shape is composed by four blocks of varying connectance: block C11 represents the core; blocks C12 and C21 include the interactions between core and periphery; block C22 includes the interactions that occur between peripheral species.
This fonction computes the core-peripheriness (CPness), as
CPness=(E11+E12+E21)/E, where Eij is the number of interactions
(edges) or the sum of weights for each block (Eij for block ij) or
for the entire network (E). Here, we rely on a stochastic block model
(SBM) to detect the four groups/blocks C11, C12, C21 and C22 when they
actually exist. However, the SBM can fail in finding these blocks: in
these cases, there is no core-periphery partition and the CPness value is set to NA
.
This function can deal with binary and weighted networks with the appropriate statistical distribution (Bernouilli for binary
data, Poisson for integer
weights, and Gaussian for float
weights). Note that it is often advisable to log-transform float data before running the cpness
function.
Value
cpness
returns an object of class list
with the following components:
cpness |
The value of the core-peripheriness measure. |
rowmembership |
An integer |
colmembership |
Same as |
Author(s)
Authors: Vincent Miele Maintainer: Vincent Miele <vincent.miele@univ-lyon1.fr>
References
Ana M. Martin Gonzalez, Diego P. Vazquez, Rodrigo Ramos-Jiliberto, Sang Hoon Lee & Vincent Miele, Core-periphery structure in mutualistic networks: an epitaph for nestedness? BiorXiv (2020) <doi:10.1101/2020.04.02.021691>
Examples
library(bipartite)
data(mosquin1967)
result <- cpness(mosquin1967, type="automatic", plot=TRUE)
print(result)
data(junker2013)
result <- cpness(junker2013, type="automatic", plot=TRUE, fastplot=TRUE)
print(result$cpness)
print(table(result$rowmembership))
print(table(result$colmembership))