Description Usage Arguments Details Value Author(s)
Model adegency matrix using K-nearest neighbour approach
1 2 3 4 5 6 7 8 9 10 |
data |
An object of the class alienData, see |
distFrom |
Character string defining which distance (or dissimilarity) to apply on the "From" species. Check |
distTo |
Character string defining which distance (or dissimilarity) to apply on the "To" species. Check |
distTraitFrom |
Character string defining which distance (or dissimilarity) to apply on the traits of the "From" species. Check |
distTraitTo |
Character string defining which distance (or dissimilarity) to apply on the "To" species. Check |
weight |
Numeric. Defines the contribution of the traits (or phylogeny) in the analysis. Must be between 0 and 1. Default is 0.5. |
nNeig |
Integer defining how many neighbours to consider. |
phylo |
Logical. Whether phylogenetic information should be used instead of traits to measure neighbourhood. Default is FALSE. |
This function should only be used for bipartite adjacency matrices.
The function is designed in such a way that if the argument distTraitFrom
is defined it will build a distance matrix using traitFrom
in the alienData
object even if distTraitFrom
is available in alienData
object. The same is true for the argument distTraitTo
.
The argument weight
defines the important of traits (or phylogeny) in the analysis. If a weight of 0 is given, the traits (or phylogeny) are assumed to have no importance. Conversely, if weight
is 1 the traits (or phylogeny) are given their full importance in the analysis.
If phylo
is TRUE, the cophenetic distance is used to calculate the distance between pairs of species.
When ranking the species to find the nNeig
nearest neighbour, in case of ties the argument tie.method
in the rank
function is set to "first". Also, when ranking the species, it is assumed that the species is not a neighbour of itself.
NAs were removed in the calculation of the distances whenever they were present, but also in the calculation of the interaction probability. For species where all distance values are NAs, the returned interactions probability will be 0.
An object with a class alienFit and a class fitKNN.
F. Guillaume Blanchet and Dominique Gravel
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.