robustness_emp {robber} | R Documentation |
Empirical Robustness of a Network
Description
Compute the robustness of an ecological network by averaging over a great number of randomly generated primary extinctions sequences
Usage
robustness_emp(
A,
ext_seq = "uniform",
nb_iter = 300,
net_type = "bipartite",
method = "ordered",
power = 1,
block = NULL
)
Arguments
A |
A binary incident matrix |
ext_seq |
A string, the rule for the primary extinctions sequences,
one of |
nb_iter |
An integer, the number of generated sequences. Default to
|
net_type |
A string, the type of network. For now, only "bipartite" is available. |
method |
A string used when
|
power |
An integer (default to 1). Only used when
|
block |
A vector of row species memberships for |
Value
A list (robber object) with the following fields:
-
$model
,$ext_seq
,$method
,power
-
$fun
is the robustness function, a vector of size(nrow(A) +1)
-
$sd
Standard deviation of the secondary extinctions -
$auc
the area under the curve of the robustness function
Examples
A <- matrix(c(1, 0, 0,
0, 1, 0,
0, 0, 1,
1, 1, 1), nrow = 4, ncol = 3, byrow = TRUE)
my_rob <- robustness_emp(A, ext_seq = "increasing")
my_rob$fun
my_rob$auc