global
extracts the backbone of a weighted network using a global threshold
global(
W,
upper = 0,
lower = NULL,
keepzeros = TRUE,
class = "original",
narrative = FALSE
)
real, FUN, or NULL: upper threshold value or function that evaluates to an upper threshold value.
real, FUN, or NULL: lower threshold value or function that evaluates to a lower threshold value.
boolean: TRUE if zero-weight edges in W
should be excluded from (i.e. also be zero in) the backbone
string: the class of the returned backbone graph, one of c("original", "matrix", "sparseMatrix", "igraph", "network", "edgelist").
If "original", the backbone graph returned is of the same class as W
.
boolean: TRUE if suggested text & citations should be displayed.
Binary or signed backbone graph of class given in parameter class
.
The global
function retains a edge in the backbone if its weight exceeds upper
. If a lower
threshold is also
specified, it returns a signed backbone in which edge weights are set to 1 if above the given upper threshold,
set to -1 if below the given lower threshold, and set to 0 otherwise. Prior to v2.0.0, the global
function was
called universal()
, which is now depricated.
If W
is an unweighted bipartite graph, any rows and columns that contain only zeros or only ones are removed, then
the global threshold is applied to its weighted bipartite projection.
Neal, Z. P. (2014). The backbone of bipartite projections: Inferring relationships from co-authorship, co-sponsorship, co-attendance, and other co-behaviors. Social Networks, 39, 84-97. 10.1016/j.socnet.2014.06.001
# NOT RUN {
W <- matrix(sample(0:5, 100, replace = TRUE), 10) #Random weighted graph
diag(W) <- 0
W
global(W, narrative = TRUE) #Keep all non-zero edges
global(W, upper = 4, lower = 2, narrative = TRUE) #Signed with specified thresholds
global(W, upper = function(x)mean(x), #Above-average --> positive edges
lower = function(x)mean(x), narrative = TRUE) #Below-average --> negative edges
# }
Run the code above in your browser using DataLab