Shep.comp {asbio}R Documentation

Shepard plot type comparisons for PCoA

Description

Calculates raw R^2, Linear fit R^2 and non-metric R^2 for PCoA ordinations.

Usage

Shep.comp(dis, max.dim = 10)

Arguments

dis A dissimilarity matrix. Any index from get.dist can be used.
max.dim The maximum number of cmdscale dimensions for which correlations should be calculated.

Details

The function Shep.comp in asbio creates calculates three sorts correlations coefficients across all specified PCoA dimensionalities.

1) Pearson's correlations of observed distances (in the distance matrix) and fitted distances (in a PCoA ordination); i.e. "raw fits."

2) Pearson's correlations between the monotonic fitted line and the observed distances "linear fits".

3) A correlation based on stress and calculated as 1 - S^2 (Oksanen 2008), where:

S = sqrt(sum(d.hat[ij]-d[ij])^2/sum[ij]^2)

where hat{d}_{ij} is the distance between rank order of distance between point i and j in the final configuration (i.e. the fitted monotonic stressplot line), and d_{ij} is the distance between point i and j in the original distance matrix.

The first type of correlation "raw fits" should probably not be used since the relationship between community dissimilarity and a configuration may be strong while being non-linear. The second correlation should be linear even if the relationship between observed dissimilarity and dissimilarities in the final configuration are non-linear, and is often referred to as the linear fit (Oksanen 2008). The final type of correlation has been called "non-metric" fit (Oksanen 2008).

Value

Returns a matrix with three columns containing R^2 for raw, linear, and non-metric R^2's.

Author(s)

Ken Aho

References

Oksanen, J. (2008) Multivariate analysis of ecological communities in R: vegan tutorial. http://cc.oulu.fi/~jarioksa/opetus/metodi/vegantutor.pdf

See Also

get.dist, cmdscale

Examples

data(varespec)
d<-get.dist(varespec,"steinhaus")
Shep.comp(d,max.dim=10)

[Package asbio version 0.1 Index]