Procrustes Rotation of Two Configurations and PROTEST (2025)

procrustes {vegan}R Documentation

Description

Function procrustes rotates a configuration to maximum similaritywith another configuration. Function protest tests thenon-randomness (significance) between two configurations.

Usage

procrustes(X, Y, scale = TRUE, symmetric = FALSE, scores = "sites", ...)## S3 method for class 'procrustes'summary(object, digits = getOption("digits"), ...)## S3 method for class 'procrustes'plot(x, kind=1, choices=c(1,2), to.target = TRUE, type = "p", xlab, ylab, main, ar.col = "blue", length=0.05, cex = 0.7, ...)## S3 method for class 'procrustes'points(x, display = c("target", "rotated"), choices = c(1,2), truemean = FALSE, ...)## S3 method for class 'procrustes'text(x, display = c("target", "rotated"), choices = c(1,2), labels, truemean = FALSE, ...)## S3 method for class 'procrustes'lines(x, type = c("segments", "arrows"), choices = c(1, 2), truemean = FALSE, ...)## S3 method for class 'procrustes'residuals(object, ...)## S3 method for class 'procrustes'fitted(object, truemean = TRUE, ...)## S3 method for class 'procrustes'predict(object, newdata, truemean = TRUE, ...)protest(X, Y, scores = "sites", permutations = how(nperm = 999), ...)

Arguments

X

Target matrix

Y

Matrix to be rotated.

scale

Allow scaling of axes of Y.

symmetric

Use symmetric Procrustes statistic (the rotation willstill be non-symmetric).

scores

Kind of scores used. This is the display argumentused with the corresponding scores function: seescores, scores.cca andscores.cca for alternatives.

x, object

An object of class procrustes.

digits

Number of digits in the output.

kind

For plot function, the kind of plot produced:kind = 1 plots shifts in two configurations, kind = 0draws a corresponding empty plot, and kind = 2plots an impulse diagram of residuals.

choices

Axes (dimensions) plotted.

xlab, ylab

Axis labels, if defaults unacceptable.

main

Plot title, if default unacceptable.

display

Show only the "target" or "rotated"matrix as points.

to.target

Draw arrows to point to target.

type

The type of plot drawn. In plot, the typecan be "points" or "text" to select the marker forthe tail of the arrow, or "none" for drawing an emptyplot. In lines the type selects eitherarrows or line segments to connecttarget and rotated configuration.

truemean

Use the original range of target matrix instead ofcentring the fitted values. Function plot.procrustes needstruemean = FALSE, and adding graphical items to the plotsfrom the original results may need truemean = TRUE.

newdata

Matrix of coordinates to be rotated and translated tothe target.

permutations

a list of control values for the permutationsas returned by the function how, or thenumber of permutations required, or a permutation matrix where eachrow gives the permuted indices.

ar.col

Arrow colour.

length

Width of the arrow head.

labels

Character vector of text labels. Rownames of the result object are used as default.

cex

Character expansion for points or text.

...

Other parameters passed to functions. In procrustesand protest parameters are passed to scores, ingraphical functions to underlying graphical functions.

Details

Procrustes rotation rotates a matrix to maximum similarity with atarget matrix minimizing sum of squared differences. Procrustesrotation is typically used in comparison of ordination results. It isparticularly useful in comparing alternative solutions inmultidimensional scaling. If scale=FALSE, the function onlyrotates matrix Y. If scale=TRUE, it scales linearlyconfiguration Y for maximum similarity. Since Y is scaledto fit X, the scaling is non-symmetric. However, withsymmetric=TRUE, the configurations are scaled to equaldispersions and a symmetric version of the Procrustes statisticis computed.

Instead of matrix, X and Y can be results from anordination from which scores can extract results.Function procrustes passes extra arguments toscores, scores.cca etc. so that you canspecify arguments such as scaling.

Function plot plots a procrustes object and returnsinvisibly an ordiplot object so that functionidentify.ordiplot can be used for identifyingpoints. The items in the ordiplot object are calledheads and points with kind=1 (ordinationdiagram) and sites with kind=2 (residuals). Inordination diagrams, the arrow heads point to the targetconfiguration if to.target = TRUE, and to rotatedconfiguration if to.target = FALSE. Target and originalrotated axes are shown as cross hairs in two-dimensional Procrustesanalysis, and with a higher number of dimensions, the rotated axesare projected onto plot with their scaled and centredrange. Function plot passes parameters to underlying plottingfunctions. For full control of plots, you can draw the axes usingplot with kind = 0, and then add items withpoints or lines. These functions pass all parametersto the underlying functions so that you can select the plottingcharacters, their size, colours etc., or you can select the width,colour and type of line segments or arrows, or you canselect the orientation and head width of arrows.

Function residuals returns the pointwiseresiduals, and fitted the fitted values, either centred to zeromean (if truemean=FALSE) or with the original scale (thesehardly make sense if symmetric = TRUE). Inaddition, there are summary and print methods.

If matrix X has a lower number of columns than matrixY, then matrix X will be filled with zero columns tomatch dimensions. This means that the function can be used to rotatean ordination configuration to an environmental variable (mostpractically extracting the result with the fittedfunction). Function predict can be used to add new rotatedcoordinates to the target. The predict function will alwaystranslate coordinates to the original non-centred matrix. Thefunction cannot be used with newdata for symmetricanalysis.

Function protest performs symmetric Procrustes analysisrepeatedly to estimate the significance of the Procrustesstatistic. Function protest uses a correlation-like statisticderived from the symmetric Procrustes sum of squares ss asr =\sqrt{1-ss}, and also prints the sum ofsquares of the symmetric analysis, sometimes calledm_{12}^2. Function protest has ownprint method, but otherwise uses procrustesmethods. Thus plot with a protest object yields aProcrustean superimposition plot.

Value

Function procrustes returns an object of classprocrustes with items. Function protest inherits fromprocrustes, but amends that with some new items:

Yrot

Rotated matrix Y.

X

Target matrix.

ss

Sum of squared differences between X and Yrot.

rotation

Orthogonal rotation matrix.

translation

Translation of the origin.

scale

Scaling factor.

xmean

The centroid of the target.

symmetric

Type of ss statistic.

call

Function call.

t0

This and the following items are only in classprotest: Procrustes correlation from non-permuted solution.

t

Procrustes correlations from permutations. The distributionof these correlations can be inspected with permustatsfunction.

signif

Significance of t

permutations

Number of permutations.

control

A list of control values for the permutationsas returned by the function how.

control

the list passed to argument control describingthe permutation design.

Note

The function protest follows Peres-Neto & Jackson (2001),but the implementation is still after Mardia et al.(1979).

Author(s)

Jari Oksanen

References

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

Peres-Neto, P.R. and Jackson, D.A. (2001). How well do multivariatedata sets match? The advantages of a Procrustean superimpositionapproach over the Mantel test. Oecologia 129: 169-178.

See Also

monoMDS, for obtainingobjects for procrustes, and mantel for analternative to protest without need of dimension reduction. Seehow for details on specifying the type ofpermutation required.

Examples

## IGNORE_RDIFF_BEGINdata(varespec)vare.dist <- vegdist(wisconsin(varespec))mds.null <- monoMDS(vare.dist, y = cmdscale(vare.dist))mds.alt <- monoMDS(vare.dist)vare.proc <- procrustes(mds.alt, mds.null)vare.procsummary(vare.proc)plot(vare.proc)plot(vare.proc, kind=2)residuals(vare.proc)## IGNORE_RDIFF_END

[Package vegan version 2.6-6.1 Index]

Procrustes Rotation of Two Configurations and PROTEST (2025)
Top Articles
Latest Posts
Recommended Articles
Article information

Author: Trent Wehner

Last Updated:

Views: 6668

Rating: 4.6 / 5 (56 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Trent Wehner

Birthday: 1993-03-14

Address: 872 Kevin Squares, New Codyville, AK 01785-0416

Phone: +18698800304764

Job: Senior Farming Developer

Hobby: Paintball, Calligraphy, Hunting, Flying disc, Lapidary, Rafting, Inline skating

Introduction: My name is Trent Wehner, I am a talented, brainy, zealous, light, funny, gleaming, attractive person who loves writing and wants to share my knowledge and understanding with you.