[R-sig-eco] Which R package for Second-Stage nMDS ?

Dixon, Philip M [STAT] pd|xon @end|ng |rom |@@t@te@edu
Fri Mar 22 17:07:48 CET 2019


Pierre,

I don't know a function that does this, but it is extremely easy to code.

Dist objects are vectors containing the 1st stage pairwise dissimilarities.   Call those dist1, dist2, dist3, ...  So alldist <- cbind(dist1=dist1, dist2=dist2, ...) will assemble the matrix of dissimilarities with useful column names.  stage2 <- as.dist(1-cor(alldist)) will compute the matrix of correlations, convert from similarity (the correlation) to distance (1-correlation) and convert to a distance object.  Then just run your favorite MDS on stage2.  

Note: sometimes folks prefer sqrt(1-cor) as the "correlation distance", instead of 1-cor.  I don't know which Clarke prefers.

Best,
Philip Dixon



More information about the R-sig-ecology mailing list