ord_corr: Ordination correlations

Description Usage Arguments Details Value Examples

Description

Correlations of ordination scores versus the original dissimilarity matrix, the main species matrix, or a secondary matrix.

Usage

1
2
3
ord_varexpl(object, diss, ...)

ord_corr(object, x, method = c("pearson", "kendall", "spearman"), ...)

Arguments

object

ordination object.

diss

matrix of original dissimilarities (should exactly match those used in the ordination).

...

further arguments passed to stats::cor().

x

matrix or data.frame of variables to correlate with the ordination.

method

a character string indicating which correlation coefficient to compute, one of "pearson" (default), "kendall", or "spearman".

Details

For ord_varexpl, the correlation is calculated between each ordination axis versus the original dissimilarity matrix diss. This can be interpreted as the percentage of variance (in the original dissimilarity matrix) explained.

For ord_corr, the correlation is calculated between each ordination axis versus each column of the supplied matrix x. This can be interpreted as the strength of association between ordination scores and each individual variable.

Value

Matrix of correlations or variance explained, per ordination axis.

Examples

1
2
3
4
5
6
7
8
data(smoky, package='ecole')
spe <- smoky$spe
env <- smoky$env
D   <- vegan::vegdist(spe, method='bray') # original dissimilarities
ord <- stats::cmdscale(D, k=5)            # ordination
ord_varexpl(ord, D)
ord_corr(ord, spe)
ord_corr(ord, env)

phytomosaic/ecole documentation built on Jan. 2, 2022, 11:24 p.m.