NAG FL Interface
g03bdf (rot_​promax)

Settings help

FL Name Style:


FL Specification Language:


1 Purpose

g03bdf calculates a ProMax rotation, given information following an orthogonal rotation.

2 Specification

Fortran Interface
Subroutine g03bdf ( stand, n, m, x, ldx, ro, ldro, power, fp, ldfp, r, ldr, phi, ldphi, fs, ldfs, ifail)
Integer, Intent (In) :: n, m, ldx, ldro, ldfp, ldr, ldphi, ldfs
Integer, Intent (Inout) :: ifail
Real (Kind=nag_wp), Intent (In) :: x(ldx,m), ro(ldro,m), power
Real (Kind=nag_wp), Intent (Inout) :: fp(ldfp,m), r(ldr,m), phi(ldphi,m), fs(ldfs,m)
Character (1), Intent (In) :: stand
C Header Interface
#include <nag.h>
void  g03bdf_ (const char *stand, const Integer *n, const Integer *m, const double x[], const Integer *ldx, const double ro[], const Integer *ldro, const double *power, double fp[], const Integer *ldfp, double r[], const Integer *ldr, double phi[], const Integer *ldphi, double fs[], const Integer *ldfs, Integer *ifail, const Charlen length_stand)
The routine may be called by the names g03bdf or nagf_mv_rot_promax.

3 Description

Let X and Y denote n×m matrices each representing a set of n points in an m-dimensional space. The X matrix is a matrix of loadings as returned by g03baf, that is following an orthogonal rotation of a loadings matrix Z. The target matrix Y is calculated as a power transformation of X that preserves the sign of the loadings. Let Xij and Yij denote the (i,j)th element of matrices X and Y. Given a value greater than 1 for the exponent p:
Yij = δij Xij p ,  
for
The above power transformation tends to increase the difference between high and low values of loadings and is intended to increase the interpretability of a solution.
In the second step a solution of:
XW=Y , X,Y n×m , ​ W m×m ,  
is found for W in the least squares sense by use of singular value decomposition of the orthogonal loadings X. The ProMax rotation matrix R is then given by
R=OW W~ , O, ​ W~ m×m ,  
where O is the rotation matrix from an orthogonal transformation, and W~ is a matrix with the square root of diagonal elements of (WTW)-1 on its diagonal and zeros elsewhere.
The ProMax factor pattern matrix P is given by
P = X W W~ , P n×m ;  
the inter-factor correlations Φ are given by
Φ= (QTQ)-1 , Φ m×m ;  
where Q=WW~; and the factor structure S is given by
S=PΦ , S n×m .  
Optionally, the rows of target matrix Y can be scaled by the communalities of loadings.

4 References

None.

5 Arguments

1: stand Character(1) Input
On entry: indicates how loadings are normalized.
stand='S'
Rows of Y are (Kaiser) normalized by the communalities of the loadings.
stand='U'
Rows are not normalized.
Constraint: stand='U' or 'S'.
2: n Integer Input
On entry: n, the number of points.
Constraint: nm.
3: m Integer Input
On entry: m, the number of dimensions.
Constraint: m1.
4: x(ldx,m) Real (Kind=nag_wp) array Input
On entry: the loadings matrix following an orthogonal rotation, X.
5: ldx Integer Input
On entry: the first dimension of the array x as declared in the (sub)program from which g03bdf is called.
Constraint: ldxn.
6: ro(ldro,m) Real (Kind=nag_wp) array Input
On entry: the orthogonal rotation matrix, O.
7: ldro Integer Input
On entry: the first dimension of the array ro as declared in the (sub)program from which g03bdf is called.
Constraint: ldrom.
8: power Real (Kind=nag_wp) Input
On entry: p, the value of exponent.
Constraint: power>1.0.
9: fp(ldfp,m) Real (Kind=nag_wp) array Output
On exit: the factor pattern matrix, P.
10: ldfp Integer Input
On entry: the first dimension of the array fp as declared in the (sub)program from which g03bdf is called.
Constraint: ldfpn.
11: r(ldr,m) Real (Kind=nag_wp) array Output
On exit: the ProMax rotation matrix, R.
12: ldr Integer Input
On entry: the first dimension of the array r as declared in the (sub)program from which g03bdf is called.
Constraint: ldrm.
13: phi(ldphi,m) Real (Kind=nag_wp) array Output
On exit: the matrix of inter-factor correlations, Φ.
14: ldphi Integer Input
On entry: the first dimension of the array phi as declared in the (sub)program from which g03bdf is called.
Constraint: ldphim.
15: fs(ldfs,m) Real (Kind=nag_wp) array Output
On exit: the factor structure matrix, S.
16: ldfs Integer Input
On entry: the first dimension of the array fs as declared in the (sub)program from which g03bdf is called.
Constraint: ldfsn.
17: ifail Integer Input/Output
On entry: ifail must be set to 0, -1 or 1 to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of 0 causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of -1 means that an error message is printed while a value of 1 means that it is not.
If halting is not appropriate, the value -1 or 1 is recommended. If message printing is undesirable, then the value 1 is recommended. Otherwise, the value 0 is recommended. When the value -1 or 1 is used it is essential to test the value of ifail on exit.
On exit: ifail=0 unless the routine detects an error or a warning has been flagged (see Section 6).

6 Error Indicators and Warnings

If on entry ifail=0 or -1, explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
ifail=1
On entry, m=value.
Constraint: m1.
On entry, power=value.
Constraint: power>1.0.
On entry, stand=value.
Constraint: stand='U' or 'S'.
ifail=2
On entry, ldfp=value and n=value.
Constraint: ldfpn.
On entry, ldfs=value and n=value.
Constraint: ldfsn.
On entry, ldphi=value and m=value.
Constraint: ldphim.
On entry, ldr=value and m=value.
Constraint: ldrm.
On entry, ldro=value and m=value.
Constraint: ldrom.
On entry, ldx=value and n=value.
Constraint: ldxn.
On entry, n=value and m=value.
Constraint: nm.
ifail=20
The singular value decomposition has failed to converge. This is an unlikely error exit.
ifail=100
An internal error has occurred in this routine. Check the routine call and any array sizes. If the call is correct then please contact NAG for assistance.
ifail=-99
An unexpected error has been triggered by this routine. Please contact NAG.
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
ifail=-399
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
ifail=-999
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.

7 Accuracy

The calculations are believed to be stable.

8 Parallelism and Performance

g03bdf is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
g03bdf makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.

9 Further Comments

None.

10 Example

This example reads a loadings matrix and calculates a varimax transformation before calculating P, R and σ for a ProMax rotation.

10.1 Program Text

Program Text (g03bdfe.f90)

10.2 Program Data

Program Data (g03bdfe.d)

10.3 Program Results

Program Results (g03bdfe.r)