randomA {miaSim} | R Documentation |
Generate random simplified interaction matrix from a uniform distribution.
randomA( n.species, d = -0.5, min.strength = -0.5, max.strength = 0.5, connectance = 0.02, symmetric = FALSE )
n.species |
integer number of species |
d |
numeric diagonal values (should be negative)
(default: |
min.strength |
numeric minimal off-diagonal interaction strength
(default: |
max.strength |
numeric maximal off-diagonal interaction strength
(default: |
connectance |
numeric (interaction probability)
(default: |
symmetric |
logical return a symmetric interaction matrix
(default: |
randomA
returns a matrix A with dimensions (n.species x n.species)
high_inter_A <- randomA(n.species = 10, d = -0.4, min.strength = -0.8, max.strength = 0.8, connectance = 0.5) low_inter_A <- randomA(n.species = 10, connectance = 0.01)