Test community matrix stability

stable.community(W)

Arguments

W

a simulated community matrix

Value

Returns TRUE if the system is stable, FALSE otherwise.

Details

The system is stable if the eigenvalues of community matrix all have negative real part. This function tests the eigenvalues of a simulated community matrix to determine the stability of the repreeented system.

Examples

set.seed(32) ## Sample model edges <- parse.digraph(c( "E *-> D", "D *-> C", "C -> E", "E *-> B", "B *-> A", "A -> E", "D --> B")) edges <- enforce.limitation(edges) s <- community.sampler(edges) s$select(0) ## First sample is stable W <- s$community() stable.community(W)
#> [1] TRUE
## Second is not W <- s$community() stable.community(W)
#> [1] FALSE