NMSrandom | R Documentation |
This function provides a simplified version of the method of calculating NMS results implemented by the function metaMDS
(vegan).
NMSrandom(x,perm=100,k=2,stressresult=F,method="isoMDS")
x |
Distance matrix. |
perm |
Number of permutations to select the configuration with the lowest stress. |
k |
Number of dimensions for the non metric scaling result; passed to |
stressresult |
Provide the calculated stress for each permutation. |
method |
Method for calculating the NMS: |
This function is an easier method of calculating the best NMS configuration after various random starts than implemented in the metaMDS
function (vegan). The function uses a distance matrix (as calculated for example by function vegdist
from a community data set) and calculates random starting positions by function initMDS
(vegan) analogous to metaMDS
.
The function returns the NMS ordination result with the lowest stress (calculated by isoMDS
or sammon
.), or the stress of each NMS ordination.
Roeland Kindt (World Agroforestry Centre)
Kindt, R. & Coe, R. (2005) Tree diversity analysis: A manual and software for common statistical methods for ecological and biodiversity studies.
https://www.worldagroforestry.org/output/tree-diversity-analysis
library(vegan)
library(MASS)
data(dune)
distmatrix <- vegdist(dune)
Ordination.model1 <- NMSrandom(distmatrix, perm=100, k=2)
Ordination.model1 <- add.spec.scores(Ordination.model1, dune,
method='wa.scores')
Ordination.model1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.