nmds: Project a distance matrix in a euclidean space (NMDS).

Description Usage Arguments Value Author(s) Examples

View source: R/multivariate.R

Description

Project a set of points defined by a distance matrix in an eucleadean space using the Kruskal's Non-metric Multidimensional Scaling. This function is mainly a simplified interface on the isoMDS function using as much as possible dimensions to limit the stress. The aims of this NDMS being only to project point in an orthogonal space therefore without any correlation between axis. Because a non-metric method is used no condition is required on the used distance.

Usage

1
nmds(distances, maxit = 100, trace = FALSE, tol = 0.001, p = 2)

Arguments

distances

a dist object or a matrix object representing a distance matrix.

maxit

The maximum number of iterations.

trace

Logical for tracing optimization. Default TRUE.

tol

convergence tolerance.

p

Power for Minkowski distance in the configuration space.

Value

a numeric matrix with at most n-1 dimensions, with n the number pf observations. This matrix defines the coordinates of each point in the orthogonal space.

Author(s)

Eric Coissac

Christelle Gonindard-Melodelima

Examples

1
2
3
4
5
6
7
8
9
data(bacteria)
bacteria_rel_freq <- sweep(bacteria,
                           1,
                           rowSums(bacteria),
                           "/")
bacteria_hellinger <- sqrt(bacteria_rel_freq)
bacteria_dist <- dist(bacteria_hellinger)

project <- nmds(bacteria_dist)

ProcMod documentation built on May 12, 2021, 9:08 a.m.

Related to nmds in ProcMod...