Test community matrix stability
stable.community(W)
W | a simulated community matrix |
---|
Returns TRUE if the system is stable, FALSE otherwise.
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.
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