# universal: Compute universal threshold backbone In backbone: Extracts the Backbone from Weighted Graphs

## Description

'universal' returns a backbone graph in which edge weights are set to 1 if above the given upper parameter threshold, set to -1 if below the given lower parameter threshold, and are 0 otherwise.

## Usage

 `1` ```universal(M, upper = NULL, lower = NULL, bipartite = NULL, narrative = FALSE) ```

## Arguments

 `M` graph: Graph object of class matrix, sparse matrix, igraph, edgelist, or network object. Any rows and columns of the associated bipartite matrix that contain only zeros are automatically removed before computations. `upper` Real, FUN, or NULL: upper threshold value or function to be applied to the edge weights. Default is NULL. `lower` Real, FUN, or NULL: lower threshold value or function to be applied to the edge weights. Default is NULL. `bipartite` Boolean: TRUE if bipartite graph, FALSE if weighted graph. Default is NULL. If TRUE, input graph should be unweighted. `narrative` Boolean: TRUE if suggested text for a manuscript is to be returned

## Details

If both 'upper' and 'lower' are 'NULL', a weighted projection is returned.

If 'bipartite' is 'NULL', the function tries to guess at whether the data is bipartite or unipartite based on its shape.

## Value

backbone, a list(backbone, summary). The 'backbone' object is a graph object of the same class as M. The 'summary' contains a data frame summary of the inputted matrix and the model used including: model name, number of rows, number of columns, and running time.

## Examples

 ```1 2 3``` ```test <- universal(davis%*%t(davis), upper = function(x)mean(x)+sd(x), lower=function(x)mean(x)) test2 <- universal(davis, upper = function(x)mean(x)+2*sd(x), lower = 2, bipartite = TRUE) test3 <- universal(davis, upper = 4, lower = 2, bipartite = TRUE) ```

backbone documentation built on Sept. 18, 2021, 1:07 a.m.