CommunitySim simulates an ecological community, such as a microbiome using Lotka-Volterra based models. In particular, dynamics of species are simulated assuming a third species can influence the intensity of pairwise interactions, an assumption referred to as a higher-order interaction.
Lotka-Volterra describes the change of abundance of species relating to the abundance of all members in the community:
where alpha_i is species i’s growth rate without the influence from other species; b_ij is the impact of other species on the growth of i, on a per unit basis.
The higher-order interaction states that a third species can not only interact with other species in a pairwise manner, but also influence the intensity of existing pairwise interactions in the community, which is modeled by b_ij:
Here the pairwise interaction intensity is modeled as a flat rate modified by the abundance of third species, x_k.
With varying interaction intensity and initial abundance of species, the change in abundance of the community over time can be studied by solving the coupled ODEs. This package provides a simulation of above stated parameters, and a solver for the coupled ODEs.
You can install the development version from GitHub with:
# install.packages("devtools")
devtools::install_github("yuan-yin-truly/CommunitySim")
Please refer to the vignette at doc/CommunitySim.html
or
doc/CommunitySim.pdf
.