stable.community: System Stability

View source: R/Community.R

stable.communityR Documentation

System Stability

Description

Test community matrix stability

Usage

stable.community(W)

Arguments

W

a simulated community matrix

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.

Value

Returns TRUE if the system is stable, FALSE otherwise.

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)
## Second is not
W <- s$community()
stable.community(W)

SWotherspoon/QPress documentation built on Sept. 26, 2022, 2:27 a.m.