stable.community: System Stability

Description Usage Arguments Details Value Examples

View source: R/Community.R

Description

Test community matrix stability

Usage

1

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
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 Aug. 30, 2020, 5:38 p.m.