0

I am learning how to do PCoA, but when I test metaMDS, the result is different.

NMDS<-metaMDS(eurodist)
plot(NMDS)

enter image description here

NMDS<-metaMDS(as.dist(eurodist))
plot(NMDS$points)

enter image description here

http://www.davidzeleny.net/anadat-r/doku.php/en:pcoa_nmds this is where I learned. I thought MDS is for PCoA, while NMDS is not, dose the above sample mean metaMDS can do both MDS and NMDS?

Ming
  • 181
  • 2
  • 10

1 Answers1

1

You first problem is that plot(NMDS$points) is not creating the plot correctly; you must draw the plot with equal axis scaling or aspect ratio of 1. If you draw the plot correctly by hand then there is no difference:

layout(matrix(1:2, ncol = 2))
plot(metaMDS(eurodist)$points, asp = 1, main = "aps = 1")
plot(metaMDS(eurodist), main = "plot.metaMDS")
layout(1)

enter image description here

There are good reasons why we provide S3 methods for things like scores and plot so you don't need to remember the details. If you go off piste, you do need to sweat the details.

This should now answer your main question; no metaMDS() does not do *principal coordinates analysis. If you want principal coordinates analysis, see ?capscale.

Gavin Simpson
  • 170,508
  • 25
  • 396
  • 453
  • Thanks for your help. But there was another problem about PCoA (Principal Coordinate Analysis). This method is also known as MDS (Metric Multidimensional Scaling). http://www.davidzeleny.net/anadat-r/doku.php/en:pcoa_nmds Since `metaMDS()` does not do PCoA, why do you show the "MDS1" or "MDS2" in x and y when using `plot(metaMDS(eurodist)$points`? –  Ming Dec 23 '15 at 14:58
  • Those are the names on the matrix; we should perhaps change them to be `NMDSx` to be consistent with the plot, but you realised the M in MDS is for *multi*, not *metric*? [MDS is a generic term for a set of methods that map (dis)similarities into a low dimensional space](https://en.wikipedia.org/wiki/Multidimensional_scaling). Metric MDS and non-metric MDS are just two flavours of the MDS class. Some people play a little fast and loose with terminology. So it's not wrong to name the column of scores `MDSx`, but it is perhaps a little confusing and certainly inconsistent with the `plot` method. – Gavin Simpson Dec 23 '15 at 16:08
  • Thank you so much. I think I need some basic knowledge to reflect on that. I really appreciate your information. I am learning Ordination methods [here](http://ordination.okstate.edu/). By the way, is there any difference between `capscale` and `cmdscale` since both were `PCoA`? –  Ming Dec 23 '15 at 18:55
  • Hello, Gravin Simpson. I think I got the answers [here](http://stackoverflow.com/questions/6613046/multidimensional-scaling) –  Ming Dec 24 '15 at 22:36