Does a Procrustes rotation of one configuration of points to fit another.
|Printed output required (
||Whether or not isotropic scaling is allowed (
||Whether to centre the configurations (at the origin), and/or to normalize them (to unit sum of squares) prior to rotation (
||Whether to suppress reflection (
||Inputs the fixed configuration|
||Inputs the configuration to be fitted|
||To store the (standardized) fixed configuration|
||To store the fitted configuration|
||To store the rotation matrix|
||To store distances between the (standardized) fixed and fitted configurations|
||To store the residual sum of squares|
ROTATE directive provides orthogonal Procrustes rotation. You must set the parameters
YINPUT, which specify respectively the fixed configuration and the configuration that you want to be translated and rotated; these are called X and Y above. The other parameters are used for saving results from the analysis. For X and Y to refer to the same set of objects they must have the same number of rows, and each object must be represented by the same row in both X and Y. If the
XINPUT matrix is n×p and the
YINPUT matrix is n×q, Genstat does the analysis using matrices that are n×r, where r is max(p, q). The smaller matrix is expanded with columns of zeros, as explained above.
||specifies that the fixed and fitted configurations are to be printed; note that the fixed configuration is printed after any standardization (see below), and the fitted configuration is printed after standardization and rotation.|
||prints the residual distances of the points in the fixed configuration from the fitted points; this is after any standardization and rotation.|
||prints the orthogonal rotation matrix.|
||prints an analysis of variance giving the sums of squares of each configuration, and the residual sum of squares; if scaling is used, the scaling factor is also printed.|
The three other options of the
ROTATE directive control the form of analysis. The
SCALING option specifies whether you want least-squares scaling to be applied to the standardized
YINPUT matrix when finding the best fit to the fixed configuration. You should set
SCALING=yes if you want scaling; Genstat will then print the least-squares scaling factor with the analysis of variance. By default there is no scaling.
||centre the matrices to have zero column means;|
||normalize the matrices to unit sums of squares.|
The default is
STANDARDIZE=centre,normalize. The initial centring ensures that the configurations are translated to have a common centroid, and thus automatically provides the best translation of Y to match X. The normalization arranges that the residual sum of squares from rotating X to Y is the same as that for rotating Y to X. Switching off both centring and standardization is rarely advisable, but can be requested by putting
With some methods of multivariate analysis, for example the analysis of skew-symmetry, the direction of travel about the origin is important. It is then undesirable to perform a reflection as part of the rotation: the
SUPPRESSREFLECTION option can be used to prevent this. The default setting is
no, which allows reflection to take place.
Commands for: Multivariate and cluster analysis.
" Genstat example ROTA-1: Procrustes rotation." " Declare the two matrices which define the fixed configuration and the configuration to be fitted. " MATRIX [ROWS=3; COLUMNS=2; VALUES=0,0, 3,0, 0,4] Fixed & [VALUES=4.250,1.750, 5.917,5.814, -1.113,5.333] Tofit " Obtain the orthogonal Procrustes rotation, printing: coordinates - fixed and fitted configurations; the fixed configuration is printed after any standardization and the fitted configuration is printed after standardization and rotation. residuals - the residual distances of the points in the fixed configuration from the fitted points; this is after standardisation and rotation rotations - the orthogonal rotation matrix " ROTATE [PRINT=coordinates,residuals,rotations; STANDARDIZE=centre]\ XINPUT=Fixed; YINPUT=Tofit " Obtain the rotation again, this time allowing for isotropic scaling and centring the configurations. Save the fixed and fitted configurations into the matrices Xout and Yout respectively." ROTATE [PRINT=rotations,sums; SCALING=yes; STANDARDIZE=centre]\ XINPUT=Fixed; YINPUT=Tofit; XOUTPUT=Xout; YOUTPUT=Yout PRINT Xout,Yout " Store the rotation matrix and the residual sum of squares." ROTATE [PRINT=coordinates,residuals,sums]\ XINPUT=Fixed; YINPUT=Tofit; ROTATION=Rotmat; RSS=RSS PRINT Rotmat,RSS " Use a Procrustes rotation to assess the similarity between a mirror image of the initial Tofit matrix. Often the direction of travel about the origin is important and therefore it is undesirable to perform a reflection as part of the rotation. Set the SURPRESSREFLECTION option to yes to avoid this reflection." MATRIX [ROWS=3; COLUMNS=2; VALUES=4.250,-1.750, 5.917,-5.814, -1.113,\ -5.333] Tofit ROTATE [PRINT=coordinates,residuals,rotations,sums; SUPPRESSREFLECTION=yes]\ XINPUT=Fixed; YINPUT=Tofit