en:pcoa_nmds_r
Section: Ordination analysis
PCoA & NMDS (distance-based unconstrained ordination)
R functions
capscale
(libraryvegan
) - without environmental variables, the function calculates PCoA, while with environmental variables it calculates distance-based RDA. Input could be either species composition matrix (samples x species) or distance matrix (in that case, the species scores will not be available, unless the original species composition matrix is provided as argumentcomm
). By defaultdistance = “euclidean”
, which returns results identical to PCA. Note that even if no environmental variables are included, the formula structure is still required (e.g.capscale (spe ~ 1, distance = 'bray')
).cmdscale
(basic librarystats
) - calculates PCoA on matrix of distances among samples (this could be calculated e.g. by functionvegdist
from libraryvegan
). Use functionordiplot
to project the ordination diagram.wcmdscale
(libraryvegan
) - based oncmdscale
function, but allows to weight the importance of samples in the PCoA. If argumentseig = TRUE
orx.ret = TRUE
, the function returns an object of class “wcmdscale” with print, plot, scores, eigenvals and stressplot methods.pcoa
(libraryape
) - another way how to achieve PCoA analysis. Usebiplot.pcoa
function (or simply genericbiplot
) to project ordination diagram. Does not work withvegan
's functionsordiplot
orscores
.metaMDS
(libraryvegan
) - a rather advanced function calculating NMDS. Useordiplot
to plot ordination diagram. By defaultdistance = “bray”
.stressplot
(libraryvegan
) - draws Shepards stress plot, which is the relationship between real distances between samples in resulting m dimensional ordination solution, and their particular compositional dissimilarities expressed by selected dissimilarity measure.goodness
(libraryvegan
) - returns goodness-of-fit of particular samples. See example how can be this result visualized (inspired by Borcard et al. 2011).
en/pcoa_nmds_r.txt · Last modified: 2021/06/06 22:41 by David Zelený