NMSrandom: Calculate the NMS Result with the Smallest Stress from...

Description Usage Arguments Details Value Author(s) References Examples

Description

This function provides a simplified version of the method of calculating NMS results implemented by the function metaMDS (vegan).

Usage

1
NMSrandom(x,perm=100,k=2,stressresult=F,method="isoMDS")

Arguments

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.

Details

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.

Value

The function returns the NMS ordination result with the lowest stress (calculated by isoMDS or sammon.), or the stress of each NMS ordination.

Author(s)

Roeland Kindt (World Agroforestry Centre)

References

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

Examples

1
2
3
4
5
6
7
8
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

Example output

Loading required package: tcltk
Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.5-4
BiodiversityR 2.11-1: Use command BiodiversityRGUI() to launch the Graphical User Interface; 
to see changes use BiodiversityRGUI(changeLog=TRUE, backward.compatibility.messages=TRUE)

Warning message:
no DISPLAY variable so Tk is not available 
$points
         [,1]       [,2]
1  -6.3908653  2.4249888
2  -3.6552651  1.4196766
3  -1.2732715  2.7248614
4  -1.7010352  3.1819123
5  -3.5270640 -0.8133529
6  -2.4230447 -1.7014112
7  -2.9187976 -0.7052745
8   1.6345517  2.1754149
9  -0.1515229  3.2710840
10 -2.6080634 -1.1825845
11 -0.6192045 -2.4784038
12  2.0111061  3.7761900
13  1.2830606  4.9811032
14  7.1171297  0.1633661
15  6.2788225  1.6470887
16  6.2795630  4.4115366
17 -1.9443966 -7.6938635
18  0.7715233 -3.1203097
19  2.7400429 -5.7711816
20  7.2872049  1.6639645

$stress
[1] 11.91378

$cproj
                Dim1       Dim2
Achimill -3.08847000 -1.2421327
Agrostol  2.82955773  2.9442152
Airaprae  0.86626707 -6.5402544
Alopgeni  0.99208588  3.3813532
Anthodor -1.64117399 -3.2551768
Bellpere -2.12627823  0.4492372
Bromhord -2.86987619  0.4971234
Chenalbu  1.28306056  4.9811032
Cirsarve -1.70103521  3.1819123
Comapalu  6.69797610  0.9052274
Eleopalu  5.83144645  2.3815487
Elymrepe -2.58073625  2.1299557
Empenigr  2.74004287 -5.7711816
Hyporadi  0.95255690 -5.4667159
Juncarti  4.04200506  2.5898739
Juncbufo  0.41922455  3.2093736
Lolipere -2.24943058  0.4280015
Planlanc -2.13848301 -1.9935313
Poaprat  -1.73737780  0.6714174
Poatriv  -1.15019855  1.9193462
Ranuflam  5.30964817  2.3866341
Rumeacet -2.06726747 -0.1275837
Sagiproc  0.60265733  1.4799587
Salirepe  4.27006571 -1.6686047
Scorautu  0.13356420 -0.6439349
Trifprat -2.77854962 -1.2827012
Trifrepe  0.05067793  0.2117904
Vicilath -0.76873726 -2.3149254
Bracruta  1.26878698  0.1457501
Callcusp  6.91688223  1.8879968

BiodiversityR documentation built on April 20, 2021, 5:07 p.m.