nmds: Nonmetric multidimensional scaling for AFLP data

Description Usage Arguments Details Value See Also Examples

Description

This function performs successive nonmetric multidimensional scaling analyses on the loci in a BayeScan object until an adequate stress level is acheived.

Usage

1
2
3
4
5
6
7
8
9
nmds(x, max.stress, min.k, max.k, metric, type, ...)

## S3 method for class 'BayeScanData'
nmds(x, max.stress = 0.1, min.k = 2, max.k = Inf,
  metric = "gower", type = "all", ...)

## S3 method for class 'BayeScanAnalysis'
nmds(x, max.stress = 0.1, min.k = 2,
  max.k = Inf, metric = "gower", type = "all", ...)

Arguments

x

BayeScanData object.

max.stress

numeric maximum allowed stress. Defaults to 0.1.

min.k

numeric minimum number of dimensions to investigate. Defaults to 2.

max.k

numeric maximum number of dimensions to investigate. Defaults to Infinity.

metric

character name of distance metric to use. Valid arguments are 'euclidean', 'manhattan', or 'gower'. Defaults to 'gower'.

type

character type of loci to analyse. Valid arguments are 'all', 'adaptive', or 'neutral'. Defaults to 'all'.

...

arguments passed to link[vegan]{metaMDS}.

Details

The link[cluster]{daisy} function is used to calculate distances because it can accomodate missing values.

Value

metaMDS object.

See Also

link[cluster]{daisy}, link[vegan]{metaMDS}.

Examples

1
2
3
4
5
# run BayeScan using low number of iterations
dat <- read.BayeScanData(system.file('extdata', 'example_fstat_aflp.dat', package='bayescanr'))
x <- run.BayeScan(dat, threads=1, n=50, thin=1, nbp=10, pilot=10, burn=10)
# generate nmds using minimal iterations and only investigating a few k values
z <- nmds(x, metric='gower', min.k=2, max.k=5, trymax=5)

jeffreyhanson/bayescanr documentation built on May 19, 2019, 4 a.m.