This document is a supplement to the article “Ordination analysis in sedimentology, geochemistry and paleoenvironment - background, current trends and recommendations” https://doi.org/10.31223/X5N31Q
To compare NMDS output with PCA performed in part 1, we use the same input dataset. Our variables are mixed in the sense that they are expressed in various units and some are compositional, but there are no ordinal or binary variables. For such case, the Gower or altGower distance metrics should be sufficient. We don’t have to remove skewness so we use un-transformed data.
set.seed(123)
nmds_geochem <- metaMDS(reduced3, distance="gower", autotransform = F, wascores = F)
## Run 0 stress 0.151939
## Run 1 stress 0.1519387
## ... New best solution
## ... Procrustes: rmse 0.0001789614 max resid 0.0009048071
## ... Similar to previous best
## Run 2 stress 0.173818
## Run 3 stress 0.1989586
## Run 4 stress 0.1541763
## Run 5 stress 0.1736006
## Run 6 stress 0.1738915
## Run 7 stress 0.1541764
## Run 8 stress 0.1771817
## Run 9 stress 0.2232371
## Run 10 stress 0.1733772
## Run 11 stress 0.184694
## Run 12 stress 0.1538134
## Run 13 stress 0.1740661
## Run 14 stress 0.1734687
## Run 15 stress 0.1745084
## Run 16 stress 0.1538134
## Run 17 stress 0.1890486
## Run 18 stress 0.1519387
## ... New best solution
## ... Procrustes: rmse 6.422192e-05 max resid 0.0004474138
## ... Similar to previous best
## Run 19 stress 0.1891781
## Run 20 stress 0.1541764
## *** Solution reached
Fortunately, the stress value is acceptable (below 0.2), so the ordination should reflect the structure of the dataset sufficiently faithfully.
It is not usual to plot both variables and data points on an NMDS plot. So let’s focus on samples only.
## Warning in grid.Call.graphics(C_polygon, x$x, x$y, index): semi-transparency is
## not supported on this device: reported only once per page
We can also evaluate how well this reflects the structure of the dataset by examining a Shepard (stress) plot:
stressplot(nmds_geochem)