-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
55 lines (36 loc) · 2.04 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# CommunitySim
<!-- badges: start -->
[![R-CMD-check](https://github.com/yuan-yin-truly/CommunitySim/workflows/R-CMD-check/badge.svg)](https://github.com/yuan-yin-truly/CommunitySim/actions)
<!-- badges: end -->
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.
<center>
![](man/figures/summar.png){width=20%}
</center>
## Introduction
Lotka-Volterra describes the change of abundance of species relating to the abundance of all members in the community:
![](man/figures/lv.png){width=20%}
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:
![](man/figures/glv.png){width=20%}
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.
## Installation
You can install the development version from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("yuan-yin-truly/CommunitySim")
```
## How to use
Please refer to the vignette at `doc/CommunitySim.html` or `doc/CommunitySim.pdf`.