NMSrandom {BiodiversityR} | 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 isoMDS or sammon . |
stressresult |
Provide the calculated stress for each permutation. |
method |
Method for calculating the NMS: isoMDS or sammon . |
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.
http://www.worldagroforestry.org/treesandmarkets/tree_diversity_analysis.asp
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