Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

stressvals

Stress values for different dimensions of Kruskal's MDS


Description

Computes Kruskal's nonmetric multidimensional scaling isoMDS on alleleobject or prab-objects for different output dimensions in order to compare stress values.

Usage

stressvals(x,mdsdim=1:12,trace=FALSE)

Arguments

x

object of class alleleobject or link{prab}. generated by alleleinit or prabinit.

mdsdim

integer vector of MDS numbers of dimensions to be tried.

trace

logical. trace-argument for isoMDS (should trace information be printed during execution?).

Details

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.

Value

A list with components

MDSstress

vector of stress values.

mdsout

list of full outputs of isoMDS.

Author(s)

Examples

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

prabclus

Functions for Clustering and Testing of Presence-Absence, Abundance and Multilocus Genetic Data

v2.3-2
GPL
Authors
Christian Hennig <christian.hennig@unibo.it>, Bernhard Hausdorf <Hausdorf@zoologie.uni-hamburg.de>
Initial release
2020-01-06

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.