|
NAG[g03bac] NAG[nag_mv_orthomax] - Orthogonal rotations for loading matrix
|
|
Calling Sequence
g03bac(stand, g, fl, flr, r, acc, maxit, iter, 'nvar'=nvar, 'k'=k, 'tdf'=tdf, 'tdr'=tdr, 'fail'=fail)
nag_mv_orthomax(. . .)
Parameters
|
stand - String;
|
|
|
On entry: indicates if the matrix of loadings is to be row standardized before rotation.
|
|
The loadings are row standardized.
|
|
The loadings are left unstandardized.
|
|
Constraint: "Nag_RoLoadStand" or "Nag_RoLoadNotStand". .
|
|
|
g - float;
|
|
|
Constraint: . .
|
|
|
fl - Matrix(1..nvar, 1..tdf, datatype=float[8], order=C_order);
|
|
|
On exit: if 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 , fl will be unchanged on exit.
|
|
|
flr - Matrix(1..nvar, 1..tdf, datatype=float[8], order=C_order);
|
|
|
|
r - Matrix(1..k, 1..tdr, datatype=float[8], order=C_order);
|
|
|
On exit: the matrix of rotations, .
|
|
|
acc - float;
|
|
|
On entry: indicates the accuracy required. The iterative procedure of Cooley and Lohnes (1971) will be stopped and the final refinement computed when the change in is less than . 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.
|
|
It is suggested that acc be set to 0.00001.
|
|
Constraint: . .
|
|
|
maxit - integer;
|
|
|
On entry: the maximum number of iterations. It is suggested that maxit be set to 30.
|
|
Constraint: . .
|
|
|
iter - assignable;
|
|
|
Note: On exit the variable iter will have a value of type integer.
|
|
On exit: the number of iterations performed.
|
|
|
'nvar'=nvar - integer; (optional)
|
|
|
Default value: the first dimension of the arrays fl, flr.
|
|
On entry: the number of original variables, .
|
|
Constraint: . .
|
|
|
'k'=k - integer; (optional)
|
|
|
Default value: the first dimension of the array r and the second dimension of the array rthe arrays fl, flr, r.
|
|
On entry: the number of derived variates or factors, .
|
|
Constraint: . .
|
|
|
'tdf'=tdf - integer; (optional)
|
|
|
On entry: the second dimension of the array fl as declared in the function from which nag_mv_orthomax (g03bac) is called.
|
|
Constraint: . .
|
|
|
'tdr'=tdr - integer; (optional)
|
|
|
On entry: the second dimension of the array r as declared in the function from which nag_mv_orthomax (g03bac) is called.
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_mv_orthomax (g03bac) computes orthogonal rotations for a matrix of loadings using a generalized orthomax criterion.
|
|
Description
|
|
Let be the by 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 variables and the orthogonal linear combinations of these variables, the canonical variates or factors. The latter are only unique up to a rotation in the -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, , of the rotated matrix, , are either relatively large or small. The rotations may be found by minimizing the criterion:
where the constant gives a family of rotations with giving varimax rotations and 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, , such that , 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.
|
|
Error Indicators and Warnings
|
|
"NE_2_INT_ARG_LT"
On entry, while . These arguments must satisfy .
"NE_ACC_ITER"
The algorithm to find R has failed to reach the required accuracy in the given number of iterations, . Try increasing acc or increasing maxit. The returned solution should be a reasonable approximation.
"NE_ALLOC_FAIL"
Dynamic memory allocation failed.
"NE_BAD_PARAM"
On entry, argument stand had an illegal value.
"NE_INT_ARG_LE"
On entry, maxit must not be less than or equal to 0: .
"NE_INT_ARG_LT"
On entry, k must not be less than 2: .
"NE_INTERNAL_ERROR"
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please consult NAG for assistance.
"NE_REAL_ARG_LT"
On entry, g must not be less than : .
"NE_SVD_NOT_CONV"
The singular value decomposition has failed to converge. This is an unlikely error exit.
|
|
Accuracy
|
|
The accuracy is determined by the value of acc.
|
|
Further Comments
|
|
If the results of a principal component analysis as carried out by g03aac (nag_mv_prin_comp) are to be rotated, the loadings as returned in the array by g03aac (nag_mv_prin_comp) can be supplied via the argument fl to nag_mv_orthomax (g03bac). The resulting rotation matrix can then be used to rotate the principal component scores as returned in the array by g03aac (nag_mv_prin_comp). The function f06yac (dgemm) may be used for this matrix multiplication.
|
|
|
Examples
|
|
>
|
stand := "Nag_RoLoadNotStand":
g := 1:
nvar := 10:
k := 3:
tdf := 3:
tdr := 3:
acc := 1e-05:
maxit := 20:
fl := Matrix([[0.788, -0.152, -0.352], [0.874, 0.381, 0.041], [0.8139999999999999, -0.043, -0.213], [0.798, -0.17, -0.204], [0.641, 0.07000000000000001, -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.07099999999999999]], datatype=float[8], order='C_order'):
flr := Matrix(10, 3, datatype=float[8], order='C_order'):
r := Matrix(3, 3, datatype=float[8], order='C_order'):
NAG:-g03bac(stand, g, fl, flr, r, acc, maxit, iter, 'nvar' = nvar, 'k' = k, 'tdf' = tdf, 'tdr' = tdr):
|
|
|