g03 Chapter Contents
g03 Chapter Introduction
NAG Library Manual

NAG Library Function Documentnag_mv_promax (g03bdc)

1  Purpose

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

2  Specification

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

3  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_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.

5  Arguments

${\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:     nIntegerInput
On entry: $n$, the number of points.
Constraint: ${\mathbf{n}}\ge {\mathbf{m}}$.
3:     mIntegerInput
On entry: $m$, the number of dimensions.
Constraint: ${\mathbf{m}}\ge 1$.
4:     x[${\mathbf{n}}×{\mathbf{pdx}}$]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:     pdxIntegerInput
On entry: the stride separating matrix column elements in the array x.
Constraint: ${\mathbf{pdx}}\ge {\mathbf{m}}$.
6:     ro[${\mathbf{m}}×{\mathbf{pdro}}$]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:     pdroIntegerInput
On entry: the stride separating matrix column elements in the array ro.
Constraint: ${\mathbf{pdro}}\ge {\mathbf{m}}$.
8:     powerdoubleInput
On entry: $p$, the value of exponent.
Constraint: ${\mathbf{power}}>1.0$.
9:     fp[${\mathbf{n}}×{\mathbf{pdfp}}$]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:   pdfpIntegerInput
On entry: the stride separating matrix column elements in the array fp.
Constraint: ${\mathbf{pdfp}}\ge {\mathbf{m}}$.
11:   r[${\mathbf{m}}×{\mathbf{pdr}}$]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:   pdrIntegerInput
On entry: the stride separating matrix column elements in the array r.
Constraint: ${\mathbf{pdr}}\ge {\mathbf{m}}$.
13:   phi[${\mathbf{m}}×{\mathbf{pdphi}}$]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:   pdphiIntegerInput
On entry: the stride separating matrix column elements in the array phi.
Constraint: ${\mathbf{pdphi}}\ge {\mathbf{m}}$.
15:   fs[${\mathbf{n}}×{\mathbf{pdfs}}$]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:   pdfsIntegerInput
On entry: the stride separating matrix column elements in the array fs.
Constraint: ${\mathbf{pdfs}}\ge {\mathbf{m}}$.
17:   failNagError *Input/Output
The NAG error argument (see Section 3.6 in the Essential Introduction).

6  Error 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.

7  Accuracy

The calculations are believed to be stable.

8  Parallelism 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.

None.

10  Example

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

10.1  Program Text

Program Text (g03bdce.c)

10.2  Program Data

Program Data (g03bdce.d)

10.3  Program Results

Program Results (g03bdce.r)