pcoa: Principal Coordinates Analysis

pcoaR Documentation

Principal Coordinates Analysis

Description

Computes classical (metric) multidimensional scaling.

Usage

pcoa(object, ...)

## S4 method for signature 'dist'
pcoa(object, rank = 2)

Arguments

object

A distance structure.

...

Currently not used.

rank

An integer value specifying the maximal number dimension of the space which the data are to be represented in.

Value

A PCOA object.

Author(s)

N. Frerebeau

References

Gower, J. C. (1966). Some Distance Properties of Latent Root and Vector Methods Used in Multivariate Analysis. Biometrika, 53(3‑4): 325-338. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1093/biomet/53.3-4.325")}.

See Also

stats::cmdscale()

Other multivariate analysis: ca(), mca(), pca(), predict()

Examples

## Load data
data("iris")

## Compute euclidean distances
d <- dist(iris[, 1:4], method = "euclidean")

## Compute principal coordinates analysis
X <- pcoa(d)

## Screeplot
screeplot(X)

## Plot results
plot(X, extra_quali = iris$Species)

## Add convex hulls
plot(
  x = X,
  extra_quali = iris$Species,
  hull = TRUE
)

## Add tolerance ellipses
plot(
  x = X,
  extra_quali = iris$Species,
  ellipse = list(type = "tolerance", level = 0.95)
)

dimensio documentation built on April 3, 2025, 10:36 p.m.