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)

Purpose

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

Syntax

[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)

Description

Let ΛΛ be the pp by kk 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 pp variables and the kk orthogonal linear combinations of these variables, the canonical variates or factors. The latter are only unique up to a rotation in the kk-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 * λij*, of the rotated matrix, Λ*Λ*, are either relatively large or small. The rotations may be found by minimizing the criterion:
kp k
V = (λij * )4γ/p
(p )
(λij * )2
i = 1
2
j = 1i = 1 j = 1
V=j=1ki=1p (λij*) 4-γpj=1k [i=1p (λij*) 2] 2
where the constant γγ gives a family of rotations with γ = 1γ=1 giving varimax rotations and γ = 0γ=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, RR, such that Λ* = Λ RΛ*=Λ 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.

References

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

Parameters

Compulsory Input Parameters

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

Optional Input Parameters

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

Input Parameters Omitted from the MATLAB Interface

ldfl ldr wk

Output Parameters

1:     fl(ldfl,k) – double array
ldflnvarldflnvar.
If stand = 'S'stand='S', the elements of fl are standardized so that the sum of squared elements for each row is 1.01.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'stand='U', fl will be unchanged on exit.
2:     flr(ldfl,k) – double array
ldflnvarldflnvar.
The rotated matrix of loadings, Λ*Λ*. flr(i,j)flrij will contain the rotated loading for the iith variable on the jjth factor, for i = 1,2,,pi=1,2,,p and j = 1,2,,kj=1,2,,k.
3:     r(ldr,k) – double array
ldrkldrk.
The matrix of rotations, RR.
4:     iter – int64int32nag_int scalar
The number of iterations performed.
5:     ifail – int64int32nag_int scalar
ifail = 0ifail=0 unless the function detects an error (see [Error Indicators and Warnings]).

Error Indicators and Warnings

Errors or warnings detected by the function:
  ifail = 1ifail=1
On entry,k < 2k<2,
ornvar < knvar<k,
org < 0.0g<0.0,
orldfl < nvarldfl<nvar,
orldr < kldr<k,
oracc < 0.0acc<0.0,
ormaxit0maxit0,
orstand'S'stand'S' or 'U''U'.
  ifail = 2ifail=2
The singular value decomposition has failed to converge. This is an unlikely error exit.
  ifail = 3ifail=3
The algorithm to find RR 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.

Accuracy

The accuracy is determined by the value of acc.

Further Comments

None.

Example

function nag_mv_rot_orthomax_example
stand = 'U';
g = 1;
nvar = int64(10);
fl = [0.788, -0.152, -0.352;
     0.874, 0.381, 0.041;
     0.814, -0.043, -0.213;
     0.798, -0.17, -0.204;
     0.641, 0.07, -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];
[flOut, flr, r, iter, ifail] = nag_mv_rot_orthomax(stand, g, nvar, fl)
 

flOut =

    0.7880   -0.1520   -0.3520
    0.8740    0.3810    0.0410
    0.8140   -0.0430   -0.2130
    0.7980   -0.1700   -0.2040
    0.6410    0.0700   -0.0420
    0.7550   -0.2980    0.0670
    0.7820   -0.2210    0.0280
    0.7670   -0.0910    0.3580
    0.7330   -0.3840    0.2290
    0.7710   -0.1010    0.0710


flr =

    0.3293   -0.2888   -0.7590
    0.8488   -0.2735   -0.3397
    0.4500   -0.3266   -0.6330
    0.3450   -0.3965   -0.6566
    0.4526   -0.2758   -0.3696
    0.2628   -0.6154   -0.4642
    0.3322   -0.5614   -0.4854
    0.4725   -0.6841   -0.1832
    0.2088   -0.7537   -0.3543
    0.4229   -0.5135   -0.4089


r =

    0.6335   -0.5337   -0.5603
    0.7580    0.5733    0.3109
    0.1553   -0.6217    0.7677


iter =

                    7


ifail =

                    0


function g03ba_example
stand = 'U';
g = 1;
nvar = int64(10);
fl = [0.788, -0.152, -0.352;
     0.874, 0.381, 0.041;
     0.814, -0.043, -0.213;
     0.798, -0.17, -0.204;
     0.641, 0.07, -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];
[flOut, flr, r, iter, ifail] = g03ba(stand, g, nvar, fl)
 

flOut =

    0.7880   -0.1520   -0.3520
    0.8740    0.3810    0.0410
    0.8140   -0.0430   -0.2130
    0.7980   -0.1700   -0.2040
    0.6410    0.0700   -0.0420
    0.7550   -0.2980    0.0670
    0.7820   -0.2210    0.0280
    0.7670   -0.0910    0.3580
    0.7330   -0.3840    0.2290
    0.7710   -0.1010    0.0710


flr =

    0.3293   -0.2888   -0.7590
    0.8488   -0.2735   -0.3397
    0.4500   -0.3266   -0.6330
    0.3450   -0.3965   -0.6566
    0.4526   -0.2758   -0.3696
    0.2628   -0.6154   -0.4642
    0.3322   -0.5614   -0.4854
    0.4725   -0.6841   -0.1832
    0.2088   -0.7537   -0.3543
    0.4229   -0.5135   -0.4089


r =

    0.6335   -0.5337   -0.5603
    0.7580    0.5733    0.3109
    0.1553   -0.6217    0.7677


iter =

                    7


ifail =

                    0



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–2013