NAG Library Function Document

1Purpose

nag_mv_promax (g03bdc) calculates a ProMax rotation, given information following an orthogonal rotation.

2Specification

 #include #include
 void nag_mv_promax (Nag_RotationLoading stand, Integer n, Integer m, const double x[], Integer pdx, const double ro[], Integer pdro, double power, double fp[], Integer pdfp, double r[], Integer pdr, double phi[], Integer pdphi, double fs[], Integer pdfs, NagError *fail)

3Description

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_orthomax (g03bac), 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.

5Arguments

1:    $\mathbf{stand}$Nag_RotationLoadingInput
${\mathbf{stand}}=\mathrm{Nag_RoLoadStand}$
Rows of $Y$ are (Kaiser) normalized by the communalities of the loadings.
${\mathbf{stand}}=\mathrm{Nag_RoLoadNotStand}$
Rows are not normalized.
Constraint: ${\mathbf{stand}}=\mathrm{Nag_RoLoadNotStand}$ or $\mathrm{Nag_RoLoadStand}$.
2:    $\mathbf{n}$IntegerInput
On entry: $n$, the number of points.
Constraint: ${\mathbf{n}}\ge {\mathbf{m}}$.
3:    $\mathbf{m}$IntegerInput
On entry: $m$, the number of dimensions.
Constraint: ${\mathbf{m}}\ge 1$.
4:    $\mathbf{x}\left[{\mathbf{n}}×{\mathbf{pdx}}\right]$const doubleInput
Note: the $\left(i,j\right)$th element of the matrix $X$ is stored in ${\mathbf{x}}\left[\left(i-1\right)×{\mathbf{pdx}}+j-1\right]$.
On entry: the loadings matrix following an orthogonal rotation, $X$.
5:    $\mathbf{pdx}$IntegerInput
On entry: the stride separating matrix column elements in the array x.
Constraint: ${\mathbf{pdx}}\ge {\mathbf{m}}$.
6:    $\mathbf{ro}\left[{\mathbf{m}}×{\mathbf{pdro}}\right]$const doubleInput
Note: the $\left(i,j\right)$th element of the matrix is stored in ${\mathbf{ro}}\left[\left(i-1\right)×{\mathbf{pdro}}+j-1\right]$.
On entry: the orthogonal rotation matrix, $O$.
7:    $\mathbf{pdro}$IntegerInput
On entry: the stride separating matrix column elements in the array ro.
Constraint: ${\mathbf{pdro}}\ge {\mathbf{m}}$.
8:    $\mathbf{power}$doubleInput
On entry: $p$, the value of exponent.
Constraint: ${\mathbf{power}}>1.0$.
9:    $\mathbf{fp}\left[{\mathbf{n}}×{\mathbf{pdfp}}\right]$doubleOutput
Note: the $\left(i,j\right)$th element of the matrix is stored in ${\mathbf{fp}}\left[\left(i-1\right)×{\mathbf{pdfp}}+j-1\right]$.
On exit: the factor pattern matrix, $P$.
10:  $\mathbf{pdfp}$IntegerInput
On entry: the stride separating matrix column elements in the array fp.
Constraint: ${\mathbf{pdfp}}\ge {\mathbf{m}}$.
11:  $\mathbf{r}\left[{\mathbf{m}}×{\mathbf{pdr}}\right]$doubleOutput
Note: the $\left(i,j\right)$th element of the matrix $R$ is stored in ${\mathbf{r}}\left[\left(i-1\right)×{\mathbf{pdr}}+j-1\right]$.
On exit: the ProMax rotation matrix, $R$.
12:  $\mathbf{pdr}$IntegerInput
On entry: the stride separating matrix column elements in the array r.
Constraint: ${\mathbf{pdr}}\ge {\mathbf{m}}$.
13:  $\mathbf{phi}\left[{\mathbf{m}}×{\mathbf{pdphi}}\right]$doubleOutput
Note: the $\left(i,j\right)$th element of the matrix is stored in ${\mathbf{phi}}\left[\left(i-1\right)×{\mathbf{pdphi}}+j-1\right]$.
On exit: the matrix of inter-factor correlations, $\Phi$.
14:  $\mathbf{pdphi}$IntegerInput
On entry: the stride separating matrix column elements in the array phi.
Constraint: ${\mathbf{pdphi}}\ge {\mathbf{m}}$.
15:  $\mathbf{fs}\left[{\mathbf{n}}×{\mathbf{pdfs}}\right]$doubleOutput
Note: the $\left(i,j\right)$th element of the matrix is stored in ${\mathbf{fs}}\left[\left(i-1\right)×{\mathbf{pdfs}}+j-1\right]$.
On exit: the factor structure matrix, $S$.
16:  $\mathbf{pdfs}$IntegerInput
On entry: the stride separating matrix column elements in the array fs.
Constraint: ${\mathbf{pdfs}}\ge {\mathbf{m}}$.
17:  $\mathbf{fail}$NagError *Input/Output
The NAG error argument (see Section 3.7 in How to Use the NAG Library and its Documentation).

6Error Indicators and Warnings

NE_ALLOC_FAIL
Dynamic memory allocation failed.
NE_INT
On entry, ${\mathbf{m}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{m}}\ge 1$.
On entry, ${\mathbf{pdfp}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{pdfp}}>0$.
On entry, ${\mathbf{pdfs}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{pdfs}}>0$.
On entry, ${\mathbf{pdphi}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{pdphi}}>0$.
On entry, ${\mathbf{pdr}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{pdr}}>0$.
On entry, ${\mathbf{pdro}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{pdro}}>0$.
On entry, ${\mathbf{pdx}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{pdx}}>0$.
NE_INT_2
On entry, ${\mathbf{n}}=〈\mathit{\text{value}}〉$ and ${\mathbf{m}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{n}}\ge {\mathbf{m}}$.
On entry, ${\mathbf{pdfp}}=〈\mathit{\text{value}}〉$ and ${\mathbf{m}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{pdfp}}\ge {\mathbf{m}}$.
On entry, ${\mathbf{pdfs}}=〈\mathit{\text{value}}〉$ and ${\mathbf{m}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{pdfs}}\ge {\mathbf{m}}$.
On entry, ${\mathbf{pdphi}}=〈\mathit{\text{value}}〉$ and ${\mathbf{m}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{pdphi}}\ge {\mathbf{m}}$.
On entry, ${\mathbf{pdr}}=〈\mathit{\text{value}}〉$ and ${\mathbf{m}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{pdr}}\ge {\mathbf{m}}$.
On entry, ${\mathbf{pdro}}=〈\mathit{\text{value}}〉$ and ${\mathbf{m}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{pdro}}\ge {\mathbf{m}}$.
On entry, ${\mathbf{pdx}}=〈\mathit{\text{value}}〉$ and ${\mathbf{m}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{pdx}}\ge {\mathbf{m}}$.
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 contact NAG for assistance.
NE_REAL_ARG_LE
On entry, ${\mathbf{power}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{power}}>1.0$.
NE_SVD_FAIL
SVD failed to converge.

7Accuracy

The calculations are believed to be stable.

8Parallelism and Performance

nag_mv_promax (g03bdc) is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
nag_mv_promax (g03bdc) 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 function. Please also consult the Users' Note for your implementation for any additional implementation-specific information.

None.

10Example

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

10.1Program Text

Program Text (g03bdce.c)

10.2Program Data

Program Data (g03bdce.d)

10.3Program Results

Program Results (g03bdce.r)

© The Numerical Algorithms Group Ltd, Oxford, UK. 2017