Prunes a network represented by a tna object by removing
edges based on a specified threshold, lowest percent of non-zero edge
weights, the disparity filter algorithm (Serrano et al., 2009), or
bootstrap significance.
Usage
prune(x, ...)
# S3 method for class 'tna'
prune(
x,
method = "threshold",
threshold = 0.1,
lowest = 0.05,
level = 0.5,
boot = NULL,
...
)
# S3 method for class 'group_tna'
prune(x, ...)Arguments
- x
An object of class
tnaorgroup_tna.- ...
Arguments passed to
bootstrap()when usingmethod = "bootstrap"and when atna_bootstrapis not supplied. Method-specific arguments supplied for another method are ignored with a warning instead of being silently discarded.- method
A
characterstring describing the pruning method. The available options are"threshold","lowest","bootstrap"and"disparity", corresponding to the methods listed in Details. The default is"threshold".- threshold
A
numericvalue specifying the edge weight threshold. Edges with weights below or equal to this threshold will be considered for removal. The default is0.1.- lowest
A
numericvalue specifying the lowest percentage of non-zero edges. This percentage of edges with the lowest weights will be considered for removal. The default is0.05.- level
A
numericvalue representing the significance level for the disparity filter. Defaults to0.5.- boot
A
tna_bootstrapobject to be used for pruning with method"bootstrap". Supplying a non-NULLvalue selects bootstrap pruning even ifmethodis omitted. A warning is issued if it conflicts with an explicitly suppliedmethod.
Value
A pruned tna or group_tna object: the removed edges have
weight zero in weights, and the pruning is recorded in the attribute
pruning. Details on the pruning can be viewed with pruning_details().
The original model can be restored with deprune().
Details
The available methods are:
"threshold": Removes the edges whose weight is at mostthreshold."lowest": Removes the edges whose weight is at most thelowestquantile of the positive edge weights."disparity": Keeps the edges that are significant at levellevelunder the disparity filter of Serrano et al. (2009), either among the outgoing edges of their source state or among the incoming edges of their target state. Self-loops are always removed by this method."bootstrap": Keeps the edges that are significant inbootstrap()(themodelelement of atna_bootstrapobject).
With "threshold" and "lowest", an edge is only removed when the
network stays weakly connected without it, so some edges below the
cut-off can be retained. The "disparity" and "bootstrap" methods do
not check the connectivity.
References
Serrano, M. A., Boguna, M., & Vespignani, A. (2009). Extracting the multiscale backbone of complex weighted networks. Proceedings of the National Academy of Sciences, 106(16), 6483–6488. doi:10.1073/pnas.0808904106
See also
Validation functions
bootstrap(),
deprune(),
estimate_cs(),
markov_order(),
permutation_test(),
permutation_test.group_tna(),
plot.group_tna_bootstrap(),
plot.group_tna_permutation(),
plot.group_tna_stability(),
plot.tna_bootstrap(),
plot.tna_markov_order(),
plot.tna_permutation(),
plot.tna_reliability(),
plot.tna_stability(),
print.group_tna_bootstrap(),
print.group_tna_permutation(),
print.group_tna_stability(),
print.summary.group_tna_bootstrap(),
print.summary.tna_bootstrap(),
print.summary.tna_markov_order(),
print.tna_bootstrap(),
print.tna_markov_order(),
print.tna_permutation(),
print.tna_reliability(),
print.tna_stability(),
pruning_details(),
reliability(),
reprune(),
summary.group_tna_bootstrap(),
summary.tna_bootstrap(),
summary.tna_markov_order(),
summary.tna_permutation(),
summary.tna_reliability(),
summary.tna_stability()
Examples
model <- tna(group_regulation)
pruned_threshold <- prune(model, method = "threshold", threshold = 0.1)
pruned_percentile <- prune(model, method = "lowest", lowest = 0.05)
pruned_disparity <- prune(model, method = "disparity", level = 0.5)
