Learn R Programming

backbone (version 1.4.0)

backbone.extract: Extracts the backbone of a weighted network using results from a null model

Description

`backbone.extract` returns a binary or signed adjacency matrix containing the backbone that retains only the significant edges.

Usage

backbone.extract(
  backbone,
  signed = TRUE,
  alpha = 0.05,
  fwer = "none",
  class = "original",
  narrative = FALSE
)

Arguments

backbone

backbone: backbone S3 class object.

signed

Boolean: TRUE if signed backbone is to be returned, FALSE if binary backbone is to be returned

alpha

Real: significance level of hypothesis test(s)

fwer

string: type of familywise error rate correction to be applied; c("none","bonferroni","holm"). If "holm", Holm Bonferroni Family-wise Error Rate test is used, if "bonferroni", Bonferroni Family-wise Error Rate test should be used. By default, the given 'alpha' value is used for all tests with no correction for family-wise error rates.

class

string: the class of the returned backbone graph, one of c("original", "matrix", "sparseMatrix", "igraph", "network", "edgelist"), converted via tomatrix. If "original", the backbone graph returned is of the same class as the data inputted in the original backbone null model.

narrative

Boolean: TRUE if suggested text for a manuscript is to be returned

Value

backbone graph: Binary or signed backbone graph of class given in parameter `class`.

Details

The "backbone" S3 class object is composed of two matrices, a summary dataframe and (optionally, if generated by using fdsm) a 'dyad_values' vector. This object is returned by sdsm, fdsm, fixedrow, fixedcol, fixedfill.

The Holm Bonferroni correction was originally a port from python code written by Dr. Samin Aref. The authors thank Dr. Aref greatly for his contribution to this package!

Examples

Run this code
# NOT RUN {
probs <- sdsm(davis)
bb <- backbone.extract(probs, alpha = .2, signed = TRUE, fwer = "none")
# }

Run the code above in your browser using DataLab