Compares random matrices in which variation in component response rate does not vary to random matrices in which this variation for 2 to max_sp components. This function is to be used for random networks, in which off-diagonal elements are randomly sampled from a normal distribution with a mean of 'mn' and a standard deviation of 'sigma'.

rand_gen_var(max_sp, iters, int_type = 0, rmx = 0.4, C = 1, by = 1,
  sigma = 0.4, mn = 0, dval = 1, g_dist = 1, g_mn = 1, g_sd = 1)

Arguments

max_sp

Maximum number of components to randomise

iters

Number of iterations (i.e., random matrices) per component

int_type

Type of interaction between components including random (0), competitor (1), mutualist (2), predator-prey (3), and cascade model (4)

rmx

Standard deviation of population growth rates (for feasibility)

C

Connectedness of matrices (i.e., probability of non-zero matrix element components.

by

Sequence between component number to randomise (e.g., '2': 2, 4, 6)

sigma

Standard deviation of interaction strength among network elements

mn

Mean interaction strength among network elements

dval

Self-regulation of network elements (1 by default)

g_dist

Gamma distribution to be used (1 by default)

g_mn

Mean value of gamma distribution (only for g_dist 0)

g_sd

Standard deviation of gamma distribution (only for g_dist 2-4)

Value

A table of stability results, where rows summarise for each component number (S) the number of stable or unstable (also, feasible and infeasible) random matrices produced.

Examples

rand_gen_var(max_sp = 2, iters = 4);
#> [1] 2
#> S A_unstable A_stable M_unstable M_stable A_stabilised A_destabilised #> [1,] 2 0 4 0 4 0 0 #> A_infeasible A_feasible M_infeasible M_feasible A_made_feasible #> [1,] 2 2 2 2 0 #> A_made_infeasible A_rho M_rho rho_diff rho_abs complex_A complex_M #> [1,] 0 NA NA NA NA 0.490642 0.4704908 #> A_eig M_eig LR_A UR_A LR_M UR_M #> [1,] -0.9688859 -0.914339 -1.03744 -0.8022137 -1.023615 -0.8007735