simulate_lotka: Implementation to simulate a Lotka-Volterra model on a...

Description Usage Arguments Value

View source: R/lotka-volterra.R

Description

Simulate time series on a network from the Lotka-Volterra model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
simulate_lotka(
  input_matrix,
  L,
  init = NULL,
  gr = NULL,
  cap = NULL,
  inter = NULL,
  dt = 0.01,
  stochastic = TRUE,
  pertb = NULL
)

Arguments

input_matrix

The input (ground-truth) adjacency matrix of a graph with 'N' nodes. Must be valid square adjacency matrix.

L

The length of the desired time series.

init

Initial condition vector. If not specified an initial condition is uniformly generated from 0 to the nodes' carrying capacity.

gr

Growth rate vector. If not specified, default to 1 for all nodes.

cap

Carrying capacity vector. If not specified, default to 1 for all nodes.

inter

N*N Matrix of interaction weights between nodes. If not specified, default to a zero-diagonal matrix whose i,j entry is (j - i) / (N - 1)

dt

Float or vector of sizes of time steps when simulating the continuous-time dynamics.

stochastic

Boolean determining whether to simulate the stochastic or deterministic dynamics.

pertb

Vector of perturbation magnitude of nodes' growth. If not specified, default to 0.01 for all nodes.

Value

An N * L array of synthetic time series data.


Fagan-Lab/dynet documentation built on March 3, 2021, 2:53 a.m.