simulateSOI | R Documentation |
Generate time-series with The Self-Organised Instability (SOI) model. Implements a K-leap method for accelerating stochastic simulation.
simulateSOI(
n_species,
x0 = NULL,
names_species = NULL,
carrying_capacity = 1000,
A = NULL,
k_events = 5,
t_end = 1000,
metacommunity_probability = runif(n_species, min = 0.1, max = 0.8),
death_rates = runif(n_species, min = 0.01, max = 0.08),
norm = FALSE
)
n_species |
Integer: number of species |
x0 |
a vector of initial community abundances
If (default: |
names_species |
Character: names of species. If NULL,
|
carrying_capacity |
integer community size, number of available sites (individuals) |
A |
matrix: interaction matrix defining the positive and negative
interactions between n_species. If NULL, |
k_events |
integer number of transition events that are allowed to take
place during one leap. (default: |
t_end |
Numeric: the end time of the simulation, defining the
modeled time length of the community.
(default: |
metacommunity_probability |
Numeric: Normalized probability distribution
of the likelihood that species from the metacommunity can enter the community
during the simulation. By default, |
death_rates |
Numeric: death rates of each species. By default,
|
norm |
logical scalar indicating whether the time series should be
returned with the abundances as proportions ( |
simulateSOI
returns a TreeSummarizedExperiment class object
# Generate interaction matrix
A <- miaSim::powerlawA(10, alpha = 1.2)
# Simulate data from the SOI model
tse <- simulateSOI(
n_species = 10, carrying_capacity = 1000, A = A,
k_events = 5, x0 = NULL, t_end = 150, norm = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.