Description Usage Arguments Value Note See Also
Calculates association metrics between all pairs of species in the dataset.
1 |
x |
data.frame where each column is a species. Rows can be sites or visits; if visits, using or.glmer with a grouping factor might be a good idea. |
method |
Name of the function to be used to calculate the degree of association between two species. |
asymmetric |
If FALSE (the default), the pairwise association metric is assumed to be symmetric, and the function returns a data.frame with nrow(x)=choose(ncol(x), 2). If TRUE, the output has twice this many rows, with both directions of the association being calculated separately. |
... |
further information passed to 'method' |
A 3-column data.frame containing the names of the pair of species in question ($sp1, $sp2) the requested association metric ($value). If the specified function returns more than one value, then this function returns multiple columns (e.g. method="glmer.coef").
Be aware that this function can take a long time to run for large matrices. Methods for calculating pairwise associations in this package include:
Significance of association using Fisher's exact test
Effect of species A on species B from mixed models; returns slope, se, z and p
Mutual information as defined in information theory
Asymmetric odds ratio using contingency tables
Asymmetric odds ratio using logisitic regression
Asymmetric odds ratio using logisitic mixed models (using lme4)
The default; symmetric odds ratio using contingency tables
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.