Learn R Programming

backbone (version 3.0.3)

backbone_from_projection: Extract the backbone from a weighted bipartite or hypgergraph projection

Description

backbone_from_projection() extracts the unweighted backbone from the weighted projection of a bipartite network or hypergraph

Usage

backbone_from_projection(
  B,
  alpha = 0.05,
  model = "sdsm",
  signed = FALSE,
  mtc = "none",
  missing_as_zero = FALSE,
  narrative = FALSE,
  trials = NULL,
  backbone_only = TRUE
)

Value

A backbone in the same class as B, or if backbone_only = FALSE, then a backbone object.

Arguments

B

An unweighted bipartite network or hypergraph as an incidence matrix or Matrix, or as a bipartite igraph object

alpha

real: significance level of hypothesis test(s)

model

string: backbone model, one of: "sdsm", "fdsm", "fixedrow", "fixedcol", or "fixedfill"

signed

logical: return a signed backbone

mtc

string: type of Multiple Test Correction, either "none" or a method allowed by p.adjust().

missing_as_zero

logical: treat missing edges as edges with zero weight and test them for significance

narrative

logical: display suggested text & citations

trials

numeric: if model = "fdsm", the number of graphs generated using fastball to approximate the edge weight distribution

backbone_only

logical: return just the backbone (default), or a detailed backbone object

Details

The backbone_from_projection function extracts the backbone from the weighted projection of a bipartite network or hypergraph. The backbone is an unweighted unipartite network of agents that contains only edges whose weights in the projection are statistically significant. When signed = FALSE, the backbone contains edges that are statistically significantly strong under a one-tailed test. When signed = TRUE, the backbone contains positive edges that are statistically significantly strong, and negative edges that are statistically significantly weak, under a two-tailed test.

The model parameter controls the null model used to evaluate the statistical significance of edge weights. All available models are statistical models that are controlled by alpha, and differ in the constraints they impose on B:

  • sdsm (default) - The "Stochastic Degree Sequence Model" (SDSM; Neal et al., 2021) approximately constrains the agent and artifact degrees, and exactly constrains edges that are prohibited (weight = 10) or required (weight = 11; Neal & Neal, 2023)

  • fdsm - The "Fixed Degree Sequence Model" (Neal et al., 2021) exactly constrains the agent and artifact degrees

  • fixedfill - The "fixed fill" model (Neal et al., 2021) exactly constrains the total number of edges (i.e., sum)

  • fixedrow - The "fixed row" model (Neal et al., 2021) exactly constrains the agent degrees (i.e., row sums)

  • fixedcol - The "fixed column" model (Neal et al., 2021) exactly constrains the artifact degrees (i.e., column sums)

Although backbone_from_projection extracts the backbone from the weighted projection of a bipartite network or hypergraph, the input B must be the bipartite network or hypergraph itself, and not the weighted projection. This is necessary because these backbone models use information in the bipartite network that is missing from the projection. The "agent" nodes that appear in the projection must be represented by rows if B is an incidence matrix, or by type = FALSE nodes if B is a bipartite igraph object. In either case, the source network must be binary (i.e., unweighted), unless model = "sdsm", when "prohibited" edges can be represented with weight = 10 and "required" edges can be represented with weight = 11.

References

package: Neal, Z. P. (2025). backbone: An R Package to Extract Network Backbones. CRAN. tools:::Rd_expr_doi("10.32614/CRAN.package.backbone")

sdsm-ec model: Neal, Z. P. and Neal, J. W. (2023). Stochastic Degree Sequence Model with Edge Constraints (SDSM-EC) for Backbone Extraction. International Conference on Complex Networks and Their Applications, 12, 127-136. tools:::Rd_expr_doi("10.1007/978-3-031-53468-3_11")

all other models: Neal, Z. P., Domagalski, R., and Sagan, B. (2021). Comparing Alternatives to the Fixed Degree Sequence Model for Extracting the Backbone of Bipartite Projections. Scientific Reports, 11, 23929. tools:::Rd_expr_doi("10.1038/s41598-021-03238-3")

Examples

Run this code
#A binary bipartite network of 30 agents & 75 artifacts
#The agents form three communities
B <- rbind(cbind(matrix(rbinom(250,1,.8),10),
                 matrix(rbinom(250,1,.2),10),
                 matrix(rbinom(250,1,.2),10)),
           cbind(matrix(rbinom(250,1,.2),10),
                 matrix(rbinom(250,1,.8),10),
                 matrix(rbinom(250,1,.2),10)),
           cbind(matrix(rbinom(250,1,.2),10),
                 matrix(rbinom(250,1,.2),10),
                 matrix(rbinom(250,1,.8),10)))
B <- igraph::graph_from_biadjacency_matrix(B)

P <- igraph::bipartite_projection(B, which = "true")  #An ordinary weighted projection...
plot(P)                                               #...is a dense hairball

bb <- backbone_from_projection(B)  #A backbone...
plot(bb)                           #...is sparse with clear communities

Run the code above in your browser using DataLab