stressvals | R Documentation |
Computes Kruskal's nonmetric multidimensional scaling
isoMDS
on alleleobject
or
prab
-objects for
different output dimensions in order to compare stress values.
stressvals(x,mdsdim=1:12,trace=FALSE)
x |
object of class |
mdsdim |
integer vector of MDS numbers of dimensions to be tried. |
trace |
logical. |
Note that zero distances between
non-identical objects are replaced by the smallest nonzero distance
divided by 10 to prevent isoMDS
from producing an error.
A list with components
MDSstress |
vector of stress values. |
mdsout |
list of full outputs of |
Christian Hennig christian.hennig@unibo.it https://www.unibo.it/sitoweb/christian.hennig/en
options(digits=4)
data(tetragonula)
set.seed(112233)
taiselect <- sample(236,40)
# Use data subset to make execution faster.
tnb <-
coord2dist(coordmatrix=tetragonula.coord[taiselect,],
cut=50,file.format="decimal2",neighbors=TRUE)
ta <- alleleconvert(strmatrix=tetragonula[taiselect,])
tai <- alleleinit(allelematrix=ta,neighborhood=tnb$nblist)
stressvals(tai,mdsdim=1:3)$MDSstress
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.