Learn R Programming

vegan (version 1.4-0)

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, axes=c(1,2), xlab, ylab, main, ...)
## 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.
axes
Axes (dimensions) plotted.
xlab, ylab
Axis labels, if defaults unacceptable.
main
Plot title, if default unacceptable.
...
Other parameters passed to 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.

Instead of matrix, X and Y can be results from an ordination form which scores can extract results. 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

Examples

Run this code
data(varespec)
vare.dist <- vegdist(wisconsin(varespec))
library(MASS)  ## isoMDS
library(mva)   ## cmdscale to start isoMDS
mds.null <- isoMDS(vare.dist)
## This was a good seed for me: your rng may vary.
set.seed(237)
mds.alt <- isoMDS(vare.dist, initMDS(vare.dist), maxit=200)
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)
## Reset rng:
rm(.Random.seed)

Run the code above in your browser using DataLab