The function may be called by the names: g03bcc, nag_mv_rot_procrustes or nag_mv_procustes.
Let and be matrices. They can be considered as representing sets of points in an -dimensional space. The matrix may be a matrix of loadings from say factor or canonical variate analysis, and the matrix may be a postulated pattern matrix or the loadings from a different sample. The problem is to relate the two sets of points without disturbing the relationships between the points in each set. This can be achieved by translating, rotating and scaling the sets of points. The matrix is considered as the target matrix and the matrix is rotated to match that matrix.
First the two sets of points are translated so that their centroids are at the origin to give and , i.e., the matrices will have zero column means. Then the rotation of the translated matrix which minimizes the sum of squared distances between corresponding points in the two sets is found. This is computed from the singular value decomposition of the matrix:
where and are orthogonal matrices and is a diagonal matrix. The matrix of rotations, , is computed as:
After rotation, a scaling or dilation factor, , may be estimated by least squares. Thus, the final set of points that best match is given by:
Before rotation, both sets of points may be normalized to have unit sums of squares or the matrix may be normalized to have the same sum of squares as the matrix. After rotation, the results may be translated to the original centroid.
The th residual, , is given by the distance between the point given in the th row of and the point given in the th row of . The residual sum of squares is also computed.
Krzanowski W J (1990) Principles of Multivariate Analysis Oxford University Press
Lawley D N and Maxwell A E (1971) Factor Analysis as a Statistical Method (2nd Edition) Butterworths
1: – Nag_TransNormInput
On entry: indicates if translation/normalization is required.
No translation or normalization.
Translation to the origin.
Translation to the origin and then to the centroid after rotation.
Translation and normalization.
Translation and normalization to scale, then translation to the centroid after rotation.
, , , , or .
2: – Nag_RotationScaleInput
On entry: indicates if least squares scaling is applied after rotation.
An internal error has occurred in this function. Check the function call
and any array sizes. If the call is correct then please contact NAG for
The fitted matrix contains only zero-points when least squares scaling is applied.
On entry, either x or y contains only zero-points (possibly after translation) when normalization is to be applied.
The singular value decomposition has failed to converge. This is an unlikely error exit.
The accuracy of the calculation of the rotation matrix largely depends upon the singular value decomposition. See the F08 Chapter Introduction for further details.
8Parallelism and Performance
g03bcc is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the Users' Note for your implementation for any additional implementation-specific information.
Note that if the matrix is not of full rank, then the matrix of rotations, , may not be unique even if there is a unique solution in terms of the rotated matrix, . The matrix may also include reflections as well as pure rotations, see Krzanowski (1990).
If the column dimensions of the and matrices are not equal, the smaller of the two should be supplemented by columns of zeros. Adding a column of zeros to both and will have the effect of allowing reflections as well as rotations.
Three points representing the vertices of a triangle in two dimensions are input. The points are translated and rotated to match the triangle given by (0,0),(1,0),(0,2) and scaling is applied after rotation. The target matrix and fitted matrix are printed along with additional information.