Learn R Programming

parameters (version 0.4.0)

cmds: Classical Multidimensional Scaling (cMDS)

Description

Also referred to as principal Coordinates Analysis (PCoA), Classical Multidimensional Scaling (cMDS) takes a set of dissimilarities (i.e., a distance matrix) and returns a set of points such that the distances between the points are approximately equal to the dissimilarities.

Usage

cmds(x, n = "all", distance = "euclidean", ...)

Arguments

x

A dataframe or a statistical model.

n

Number of components to extract. If n="all", then n is set as the number of variables minus 1 (ncol(x)-1). If n="auto" (default) or n=NULL, the number of components is selected through n_factors. In reduce_parameters, can also be "max", in which case it will select all the components that are maximally pseudo-loaded (i.e., correlated) by at least one variable.

distance

The distance measure to be used. This must be one of "euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowski". Any unambiguous substring can be given.

...

Arguments passed to or from other methods.

References

  • Nguyen, L. H., \& Holmes, S. (2019). Ten quick tips for effective dimensionality reduction. PLOS Computational Biology, 15(6).

Examples

Run this code
# NOT RUN {
cmds(iris[, 1:4])
# }

Run the code above in your browser using DataLab