Learn R Programming

vegan (version 1.0-1)

procrustes: Procrustes Rotation of Two Configurations

Description

Rotates a configuration to maximum similarity with another configuration.

Usage

procrustes(X, Y, scale=TRUE)## S3 method for class 'procrustes':
summary(object, ...)## S3 method for class 'procrustes':
plot(x, kind=1, ...)
## S3 method for class 'procrustes':
residuals(object)

Arguments

X
Target matrix.
Y
Matrix to be rotated.
scale
Allow scaling of axes of Y.
x
An object of class procrustes.
object
An object of class procrustes.
kind
The kind of plot produced: kind=1 plots shifts in two configurations and kind=2 plots an impulse diagram of residuals.
...
Parameters passed to plotting functions

Value

  • Function procrustes returns an object of class procrustes with items:
  • YrotRotated matrix Y.
  • XTarget matrix.
  • ssSum of squared differences between X and Yrot.
  • rotationOrthogonal rotation matrix.
  • translationTranslation of the origin.
  • scaleScaling factor.
  • callFunction call.

Details

Procrustes rotation rotates a matrix to maximum similarity with a target matrix minimizing sum of squared differences. Procrustes rotation is typically used in comparison of ordination results. It is particularly useful in comparing alternative solutions in multidimensional scaling. If scale=FALSE, the function only rotates matrix Y. If scale=TRUE , it scales linearly configuration Y for maximum similarity. Since Y is scaled to fit X, the scaling is non-symmetric.

Function plot.procrustes plots a procrustes object and residuals.procrustes returns the pointwise residuals. In addition, there are summary and print methods.

References

Mardia, K.V., Kent, J.T. and Bibby, J.M. (1979). Multivariate Analysis. Academic Press.

See Also

isoMDS, initMDS, eqscplot

Examples

Run this code
library(MASS)
library(mva)
data(varespec)
vare.dist <- vegdist(wisconsin(varespec))
mds.null <- isoMDS(vare.dist)
## This was a good seed for me: your rng may vary.
## Reset your rng if you run this example.
set.seed(237)
mds.alt <- isoMDS(vare.dist, initMDS(vare.dist))
vare.proc <- procrustes(mds.alt$points, mds.null$points)
vare.proc
summary(vare.proc)
plot(vare.proc)
plot(vare.proc, kind=2)
residuals(vare.proc)

Run the code above in your browser using DataLab