procrustes(X, Y, scale = TRUE, symmetric = FALSE)
## S3 method for class 'procrustes':
summary(object, ...)
## S3 method for class 'procrustes':
plot(x, kind=1, choices=c(1,2), xlab, ylab, main, ...)
## S3 method for class 'procrustes':
residuals(object, ...)
## S3 method for class 'procrustes':
fitted(object, truemean = TRUE, ...)
protest(X, Y, permutations = 1000, strata)
Y
.procrustes
.procrustes
.kind=1
plots shifts in
two configurations and kind=2
plots an impulse diagram of
residuals.procrustes
returns an object of class
procrustes
with items. Function protest
inherits from
procrustes
, but amends that with some new items:Y
.X
and Yrot
.ss
statistic.protest
: Procrustes correlation from non-permuted solution.t
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. However, with
symmetric=TRUE
, the configurations are scaled to equal
dispersions and a symmetric version of the Procrustes statistic
is computed. Instead of matrix, X
and Y
can be results from an
ordination form which scores
can extract results.
Function plot
plots a procrustes
object and residuals
returns the pointwise
residuals, and fitted
the fitted values, either centred to zero
mean (if truemean=FALSE
) or with the original scale (these
hardly make sense if symmetric = TRUE
). In
addition, there are summary
and print
methods.
If matrix X
has a lower number of columns than matrix
Y
, then matrix X
will be filled with zero columns to
match dimensions. This means that the function can be used to rotate
an ordination configuration to an environmental variable (most
practically extracting the result with the fitted
function).
Function protest
calls procrustes(..., symmetric = TRUE)
repeatedly to estimate the `significance' of the Procrustes
statistic. Function protest
uses a correlation-like statistic
derived from the symmetric Procrustes sum of squares $ss$ as
$r =\sqrt{(1-ss)}$, and sometimes called $m_{12}$. Function
protest
has own print
method, but otherwise uses
procrustes
methods. Thus plot
with a protest
object
yields a ``Procrustean superimposition plot.''
Peres-Neto, P.R. and Jackson, D.A. (2001). How well do multivariate data sets match? The advantages of a Procrustean superimposition approach over the Mantel test. Oecologia 129: 169-178.
isoMDS
, initMDS
for obtaining
objects for procrustes
, and mantel
for an
alternative to protest
without need of dimension reduction.data(varespec)
vare.dist <- vegdist(wisconsin(varespec))
library(MASS) ## isoMDS
library(mva) ## cmdscale to start isoMDS
mds.null <- isoMDS(vare.dist, tol=1e-7)
## This was a good seed for me: your rng may vary.
set.seed(237)
mds.alt <- isoMDS(vare.dist, initMDS(vare.dist), maxit=200, tol=1e-7)
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