Does a Procrustes rotation of one configuration of points to fit another.

### Options

`PRINT` = string tokens |
Printed output required (`rotations` , `coordinates` , `residuals` , `sums` ); default `*` i.e. no printing |
---|---|

`SCALING` = string token |
Whether or not isotropic scaling is allowed (`yes` , `no` ); default `no` |

`STANDARDIZE` = string tokens |
Whether to centre the configurations (at the origin), and/or to normalize them (to unit sum of squares) prior to rotation (`centre` , `normalize` ); default `cent,norm` |

`SUPPRESSREFLECTION` = string token |
Whether to suppress reflection (`yes` , `no` ); default `no` |

### Parameters

`XINPUT` = matrices |
Inputs the fixed configuration |
---|---|

`YINPUT` = matrices |
Inputs the configuration to be fitted |

`XOUTPUT` = matrices |
To store the (standardized) fixed configuration |

`YOUTPUT` = matrices |
To store the fitted configuration |

`ROTATION` = matrices |
To store the rotation matrix |

`RESIDUALS` = matrices or variates |
To store distances between the (standardized) fixed and fitted configurations |

`RSS` = scalars |
To store the residual sum of squares |

### Description

The `ROTATE`

directive provides orthogonal Procrustes rotation. You must set the parameters `XINPUT`

and `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.

The `PRINT`

option specifies which results you want to print; the settings are as follows.

`coordinates` |
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. |
---|---|

`residuals` |
prints the residual distances of the points in the fixed configuration from the fitted points; this is after any standardization and rotation. |

`rotations` |
prints the orthogonal rotation matrix. |

`sums` |
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.

The `STANDARDIZE`

option specifies what preliminary standardization is to be applied to the `XINPUT`

and `YINPUT`

matrices. It has settings:

`centre` |
centre the matrices to have zero column means; |
---|---|

`normalize` |
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 `STANDARDIZE=*`

.

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.

Options: `PRINT`

, `SCALING`

, `STANDARDIZE`

, `SUPPRESSREFLECTION`

.

Parameters: `XINPUT`

, `YINPUT`

, `XOUTPUT`

, `YOUTPUT`

, `ROTATION`

, `RESIDUALS`

, `RSS`

.

### See also

Procedures: `GENPROCRUSTES`

, `PCOPROCRUSTES`

, `SAGRAPES`

.

Commands for: Multivariate and cluster analysis.

### Example

" 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