Learn R Programming

backbone (version 1.3.1)

bipartite.null: bipartite.null: generates a backbone object from a bipartite matrix using a null model defined by constraining row and/or column sums.

Description

bipartite.null: generates a backbone object from a bipartite matrix using a null model defined by constraining row and/or column sums.

Usage

bipartite.null(
  B,
  rows = TRUE,
  cols = TRUE,
  trials = NULL,
  progress = TRUE,
  ...
)

Arguments

B

graph: Bipartite graph object of class matrix, sparse matrix, igraph, edgelist, or network object.

rows

boolean: TRUE if the row sums should be constrained by the null model, FALSE if not.

cols

boolean: TRUE if the column sums should be constrained by the null model, FALSE if not.

trials

integer: number of monte carlo trials used to estimate the fdsm null model (rows = TRUE, cols = TRUE)

progress

Boolean: If txtProgressBar should be used to measure progress

...

optional arguments

Value

backbone, a list(positive, negative, summary). Here `positive` is a matrix of probabilities of edge weights being equal to or above the observed value in the projection, `negative` is a matrix of probabilities of edge weights being equal to or below the observed value in the projection, and `summary` is a data frame summary of the inputted matrix and the model used including: model name, number of rows, skew of row sums, number of columns, skew of column sums, and running time.

Details

When only rows are constrained, the hypergeometric null model (hyperg) is used. When rows and columns are constrained, the stochastic degree sequence model (sdsm) is used. When rows and columns are constrained and trials are specified, the fixed degree sequence model (fdsm) is used.

Examples

Run this code
# NOT RUN {
bipartite.null(davis, rows = TRUE, cols = FALSE) #runs hyperg on davis data
# }

Run the code above in your browser using DataLab