Description Usage Arguments Value References Examples

Generate an interaction matrix A that can be decomposed as NH.Gs . Where N is the Normal Interspecific Interaction matrix, H the interaction strength heterogeneity drawn from a power-law distribution with given parameter alpha, and G the adjacency matrix of power-law out-degree digraph ecological network, and s a scaling factor. Diagonal elements of A are subsequently set to -1.

1 | ```
powerlawA(n, alpha, stdev = 1, s = 0.1)
``` |

`n` |
the number of species |

`alpha` |
the power-law distribution parameter. Should be > 1. Larger values will give lower interaction strength heterogeneity, whereas values closer to 1 give strong heterogeneity in interaction strengths between the species. In other words, values of alpha close to 1 will give Strongly Interacting Species (SIS). |

`stdev` |
the standard deviation parameter of the normal distribution with mean 0 from which the elements of the nominal interspecific interaction matrix N are drawn |

`s` |
scaling parameter with which the final global interaction matrix A is multiplied. Default set to NULL where s is set to 0.1*max(A) after constructing the matrix A = NH*G |

The global interaction matrix A with n rows and n columns.

Gibson TE, Bashan A, Cao HT, Weiss ST, Liu YY (2016) On the Origins and Control of Community Types in the Human Microbiome. PLOS Computational Biology 12(2): e1004688. https://doi.org/10.1371/journal.pcbi.1004688

1 2 3 4 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.