distdisplayed | R Documentation |
This function compares the distance among sites as displayed in an ordination diagram (generated by ordiplot
) with the actual distances among sites as available from a distance matrix (as generated by vegdist
).
distdisplayed(x, ordiplot, distx = "bray", plotit = T, addit = F,
method = "spearman", permutations = 100, abline = F, gam = T, ...)
x |
Community data frame (with sites as rows, species as columns and species abundance as cell values) or distance matrix. |
ordiplot |
Ordination diagram generated by |
distx |
Ecological distance used to calculated the distance matrix (theoretically the same distance as displayed in the ordination diagram); passed to |
plotit |
Should a plot comparing the distance in ordination diagram (or the distance matrix) with the distance from the distance matrix be generated (or not). |
addit |
Should the GAM regression result be added to an existing plot (or not). |
method |
Method for calculating the correlation between the ordination distance and the complete distance; from function |
permutations |
Number of permutations to assess the significance of the Mantel test; passed to |
abline |
Should a reference line (y=x) be added to the graph (or not). |
gam |
Evaluate the correspondence between the original distance and the distance from the ordination diagram with GAMas estimated by |
... |
Other arguments passed to |
This function compares the Euclidean distances (between sites) displayed in an ordination diagram with the distances of a distance matrix. Alternatively, the distances of one distance matrix are compared against the distances of another distance matrix.
These distances are compared by a Mantel test (mantel
) and (optionally) a GAM regression (gam
). Optionally, a graph is provided compairing the distances and adding GAM results.
.
The function returns the results of a Mantel test and (optionally) the results of a GAM analysis.
Roeland Kindt (World Agroforestry Centre)
Kindt, R. & Coe, R. (2005) Tree diversity analysis: A manual and software for common statistical methods for ecological and biodiversity studies.
https://www.worldagroforestry.org/output/tree-diversity-analysis
library(vegan)
library(mgcv)
data(dune)
# pseudocount used by aitchison distance
distmatrix <- vegdist(dune, method="kulc", pseudocount=1)
ordination.model1 <- cmdscale(distmatrix,k=2)
ordiplot1 <- ordiplot(ordination.model1)
distdisplayed(dune, ordiplot=ordiplot1, distx="kulc", plotit=TRUE,
method="spearman", permutations=100, gam=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.