Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox: nag_mv_rot_promax (g03bd)

Purpose

nag_mv_rot_promax (g03bd) calculates a ProMax rotation, given information following an orthogonal rotation.

Syntax

[fp, r, phi, fs, ifail] = g03bd(stand, x, ro, power, 'n', n, 'm', m)
[fp, r, phi, fs, ifail] = nag_mv_rot_promax(stand, x, ro, power, 'n', n, 'm', m)

Description

Let $X$ and $Y$ denote $n$ by $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 nag_mv_rot_orthomax (g03ba), 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 ${X}_{ij}$ and ${Y}_{ij}$ denote the $\left(i,j\right)$th element of matrices $X$ and $Y$. Given a value greater than one for the exponent $p$:
 $Yij = δij Xij p ,$
for
• $i=1,2,\dots ,n$;
• $j=1,2,\dots ,m$;
• ${\delta }_{ij}=\left\{\begin{array}{c}-1\text{, if ​}{X}_{ij}<0\text{; ​}\\ 1\text{, otherwise.}\end{array}\right\$
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 $\stackrel{~}{W}$ is a matrix with the square root of diagonal elements of ${\left({W}^{\mathrm{T}}W\right)}^{-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 $\Phi$ are given by
 $Φ= QT Q-1 , Φ ∈ ℝm×m ;$
where $Q=W\stackrel{~}{W}$; 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.

None.

Parameters

Compulsory Input Parameters

1:     $\mathrm{stand}$ – string (length ≥ 1)
${\mathbf{stand}}=\text{'S'}$
Rows of $Y$ are (Kaiser) normalized by the communalities of the loadings.
${\mathbf{stand}}=\text{'U'}$
Rows are not normalized.
Constraint: ${\mathbf{stand}}=\text{'U'}$ or $\text{'S'}$.
2:     $\mathrm{x}\left(\mathit{ldx},{\mathbf{m}}\right)$ – double array
ldx, the first dimension of the array, must satisfy the constraint $\mathit{ldx}\ge {\mathbf{n}}$.
The loadings matrix following an orthogonal rotation, $X$.
3:     $\mathrm{ro}\left(\mathit{ldro},{\mathbf{m}}\right)$ – double array
ldro, the first dimension of the array, must satisfy the constraint $\mathit{ldro}\ge {\mathbf{m}}$.
The orthogonal rotation matrix, $O$.
4:     $\mathrm{power}$ – double scalar
$p$, the value of exponent.
Constraint: ${\mathbf{power}}>1.0$.

Optional Input Parameters

1:     $\mathrm{n}$int64int32nag_int scalar
Default: the first dimension of the array x.
$n$, the number of points.
Constraint: ${\mathbf{n}}\ge {\mathbf{m}}$.
2:     $\mathrm{m}$int64int32nag_int scalar
Default: the first dimension of the array ro and the second dimension of the arrays x, ro. (An error is raised if these dimensions are not equal.)
$m$, the number of dimensions.
Constraint: ${\mathbf{m}}\ge 1$.

Output Parameters

1:     $\mathrm{fp}\left(\mathit{ldfp},{\mathbf{m}}\right)$ – double array
The factor pattern matrix, $P$.
2:     $\mathrm{r}\left(\mathit{ldr},{\mathbf{m}}\right)$ – double array
The ProMax rotation matrix, $R$.
3:     $\mathrm{phi}\left(\mathit{ldphi},{\mathbf{m}}\right)$ – double array
The matrix of inter-factor correlations, $\Phi$.
4:     $\mathrm{fs}\left(\mathit{ldfs},{\mathbf{m}}\right)$ – double array
The factor structure matrix, $S$.
5:     $\mathrm{ifail}$int64int32nag_int scalar
${\mathbf{ifail}}={\mathbf{0}}$ unless the function detects an error (see Error Indicators and Warnings).

Error Indicators and Warnings

Errors or warnings detected by the function:
${\mathbf{ifail}}=1$
Constraint: ${\mathbf{m}}\ge 1$.
Constraint: ${\mathbf{power}}>1.0$.
Constraint: ${\mathbf{stand}}=\text{'U'}$ or $\text{'S'}$.
${\mathbf{ifail}}=2$
Constraint: $\mathit{ldfp}\ge {\mathbf{n}}$.
Constraint: $\mathit{ldfs}\ge {\mathbf{n}}$.
Constraint: $\mathit{ldphi}\ge {\mathbf{m}}$.
Constraint: $\mathit{ldro}\ge {\mathbf{m}}$.
Constraint: $\mathit{ldr}\ge {\mathbf{m}}$.
Constraint: $\mathit{ldx}\ge {\mathbf{n}}$.
Constraint: ${\mathbf{n}}\ge {\mathbf{m}}$.
${\mathbf{ifail}}=20$
SVD failed to converge.
${\mathbf{ifail}}=100$
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 assistance.
${\mathbf{ifail}}=-99$
${\mathbf{ifail}}=-399$
Your licence key may have expired or may not have been installed correctly.
${\mathbf{ifail}}=-999$
Dynamic memory allocation failed.

Accuracy

The calculations are believed to be stable.

None.

Example

This example reads a loadings matrix and calculates a varimax transformation before calculating $P$, $R$ and $\sigma$ for a ProMax rotation.
```function g03bd_example

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

fl = [0.74215 -0.57806;
0.71370 -0.55515;
0.87899 -0.15847;
0.62533  0.76621;
0.71447  0.67936];

% Calculate orthogonal rotation
stand = 's';
g     = 1;
[n,m] = size(fl);
nvar  = int64(n);

[~, x, ro, iter, ifail] = g03ba( ...
stand, g, nvar, fl);

% Calculate ProMax rotation

power = 3;
[fp, r, phi, fs, ifail] = g03bd( ...
stand, x, ro, power);

mtitle = 'Factor pattern';
matrix = 'General';
diag   = ' ';

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

fprintf('\n');
mtitle = 'Promax rotation';
[ifail] = x04ca( ...
matrix, diag, r, mtitle);

fprintf('\n');
mtitle = 'Inter-factor correlations';
[ifail] = x04ca( ...
matrix, diag, phi, mtitle);

fprintf('\n');
mtitle = 'Factor structure';
[ifail] = x04ca( ...
matrix, diag, fs, mtitle);

```
```g03bd example results

Factor pattern
1          2
1      0.9556    -0.0979
2      0.9184    -0.0935
3      0.7605     0.3393
4     -0.0791     1.0019
5      0.0480     0.9751

Promax rotation
1       2
1   0.7380  0.5420
2  -0.7055  0.8653

Inter-factor correlations
1       2
1   1.0000  0.2019
2   0.2019  1.0000

Factor structure
1       2
1   0.9358  0.0950
2   0.8995  0.0919
3   0.8290  0.4928
4   0.1232  0.9860
5   0.2448  0.9848
```