| backbone | R Documentation |
Applies the disparity filter to a weighted edge list. For each edge, it computes an alpha (p-value) from both endpoints and keeps the edge if it is statistically significant from at least one endpoint.
backbone(edges, alpha = 0.05)
edges |
A data frame with at least columns |
alpha |
Numeric. Significance threshold in (0, 1). Default |
The null model asks: given that node i has total strength s_i
distributed uniformly across k_i edges, what is the probability that
a single edge weight is as large as w_{ij}? The answer is
\alpha_{ij} = \left(1 - \frac{w_{ij}}{s_i}\right)^{k_i - 1}
An edge is retained if \min(\alpha_{ij}, \alpha_{ji}) < \alpha.
Nodes with only one edge always have \alpha = 0 and are always kept.
The filtered edge data frame with an added alpha column (the
minimum alpha from the two endpoints).
edges <- data.frame(
from = c("A", "A", "A", "B", "C"),
to = c("B", "C", "D", "C", "D"),
weight = c(10, 1, 1, 8, 1)
)
backbone(edges, alpha = 0.05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.