hide long namesshow long names
hide short namesshow short names
Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox: nag_mv_rot_orthomax (g03ba)


    1  Purpose
    2  Syntax
    7  Accuracy
    9  Example


nag_mv_rot_orthomax (g03ba) computes orthogonal rotations for a matrix of loadings using a generalized orthomax criterion.


[fl, flr, r, iter, ifail] = g03ba(stand, g, nvar, fl, 'k', k, 'acc', acc, 'maxit', maxit)
[fl, flr, r, iter, ifail] = nag_mv_rot_orthomax(stand, g, nvar, fl, 'k', k, 'acc', acc, 'maxit', maxit)


Let Λ be the p by k matrix of loadings from a variable-directed multivariate method, e.g., canonical variate analysis or factor analysis. This matrix represents the relationship between the original p variables and the k orthogonal linear combinations of these variables, the canonical variates or factors. The latter are only unique up to a rotation in the k-dimensional space they define. A rotation can then be found that simplifies the structure of the matrix of loadings, and hence the relationship between the original and the derived variables. That is, the elements, λij*, of the rotated matrix, Λ*, are either relatively large or small. The rotations may be found by minimizing the criterion:
V=j=1ki=1p λij* 4-γpj=1k i=1p λij* 2 2  
where the constant γ gives a family of rotations with γ=1 giving varimax rotations and γ=0 giving quartimax rotations.
It is generally advised that factor loadings should be standardized, so that the sum of squared elements for each row is one, before computing the rotations.
The matrix of rotations, R, such that Λ*=Λ R, is computed using first an algorithm based on that described by Cooley and Lohnes (1971), which involves the pairwise rotation of the factors. Then a final refinement is made using a method similar to that described by Lawley and Maxwell (1971), but instead of the eigenvalue decomposition, the algorithm has been adapted to incorporate a singular value decomposition.


Cooley W C and Lohnes P R (1971) Multivariate Data Analysis Wiley
Lawley D N and Maxwell A E (1971) Factor Analysis as a Statistical Method (2nd Edition) Butterworths


Compulsory Input Parameters

1:     stand – string (length ≥ 1)
Indicates if the matrix of loadings is to be row standardized before rotation.
The loadings are row standardized.
The loadings are left unstandardized.
Constraint: stand='S' or 'U'.
2:     g – double scalar
γ, the criterion constant with γ=1.0 giving varimax rotations and γ=0.0 giving quartimax rotations.
Constraint: g0.0.
3:     nvar int64int32nag_int scalar
p, the number of original variables.
Constraint: nvark.
4:     flldflk – double array
ldfl, the first dimension of the array, must satisfy the constraint ldflnvar.
Λ, the matrix of loadings. flij must contain the loading for the ith variable on the jth factor, for i=1,2,,p and j=1,2,,k.

Optional Input Parameters

1:     k int64int32nag_int scalar
Default: the second dimension of the array fl.
k, the number of derived variates or factors.
Constraint: k2.
2:     acc – double scalar
Default: 0.00001.
Indicates the accuracy required. The iterative procedure of Cooley and Lohnes (1971) will be stopped and the final refinement computed when the change in V is less than acc×max1.0,V. If acc is greater than or equal to 0.0 but less than machine precision or if acc is greater than 1.0, then machine precision will be used instead.
Constraint: acc0.0.
3:     maxit int64int32nag_int scalar
Default: 30.
The maximum number of iterations.
Constraint: maxit1.

Output Parameters

1:     flldflk – double array
If stand='S', the elements of fl are standardized so that the sum of squared elements for each row is 1.0 and then after the computation of the rotations are rescaled; this may lead to slight differences between the input and output values of fl.
If stand='U', fl will be unchanged on exit.
2:     flrldflk – double array
The rotated matrix of loadings, Λ*. flrij will contain the rotated loading for the ith variable on the jth factor, for i=1,2,,p and j=1,2,,k.
3:     rldrk – double array
The matrix of rotations, R.
4:     iter int64int32nag_int scalar
The number of iterations performed.
5:     ifail int64int32nag_int scalar
ifail=0 unless the function detects an error (see Error Indicators and Warnings).

Error Indicators and Warnings

Errors or warnings detected by the function:
On entry,k<2,
orstand'S' or 'U'.
The singular value decomposition has failed to converge. This is an unlikely error exit.
The algorithm to find R has failed to reach the required accuracy in the given number of iterations. You should try increasing acc or increasing maxit. The returned solution should be a reasonable approximation.
An unexpected error has been triggered by this routine. Please contact NAG.
Your licence key may have expired or may not have been installed correctly.
Dynamic memory allocation failed.


The accuracy is determined by the value of acc.

Further Comments



This example is taken from page 75 of Lawley and Maxwell (1971). The results from a factor analysis of ten variables using three factors are input and rotated using varimax rotations without standardizing rows.
function g03ba_example

fprintf('g03ba example results\n\n');

fl = [0.788, -0.152, -0.352;
      0.874,  0.381,  0.041;
      0.814, -0.043, -0.213;
      0.798, -0.170, -0.204;
      0.641,  0.070, -0.042;
      0.755, -0.298,  0.067;
      0.782, -0.221,  0.028;
      0.767, -0.091,  0.358;
      0.733, -0.384,  0.229;
      0.771, -0.101,  0.071];
[n,k] = size(fl);
nvar  = int64(n);

stand = 'U';
g     = 1;

[fl, flr, r, iter, ifail] = g03ba( ...
				   stand, g, nvar, fl);

mtitle = 'Rotated factor loadings';
matrix = 'General';
diag   = ' ';

[ifail] = x04ca( ...
                 matrix, diag, flr, mtitle);

mtitle = 'Rotated matrix';
[ifail] = x04ca( ...
                 matrix, diag, r, mtitle);

g03ba example results

 Rotated factor loadings
           1       2       3
  1   0.3293 -0.2888 -0.7590
  2   0.8488 -0.2735 -0.3397
  3   0.4500 -0.3266 -0.6330
  4   0.3450 -0.3965 -0.6566
  5   0.4526 -0.2758 -0.3696
  6   0.2628 -0.6154 -0.4642
  7   0.3322 -0.5614 -0.4854
  8   0.4725 -0.6841 -0.1832
  9   0.2088 -0.7537 -0.3543
 10   0.4229 -0.5135 -0.4089

 Rotated matrix
          1       2       3
 1   0.6335 -0.5337 -0.5603
 2   0.7580  0.5733  0.3109
 3   0.1553 -0.6217  0.7677

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015