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.
cmds(x, n = "all", distance = "euclidean", ...)
A dataframe or a statistical model.
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.
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.
Nguyen, L. H., \& Holmes, S. (2019). Ten quick tips for effective dimensionality reduction. PLOS Computational Biology, 15(6).
# NOT RUN {
cmds(iris[, 1:4])
# }
Run the code above in your browser using DataLab