## PCA / FA example 4: Davis. R-mode & Q-mode related

for this section, i need – i want – to match davis’ signs and sizes. this is just temporary.
instead of my $A^R$
$A^R = \left(\begin{array}{ccc} 7.48331&0.&0.\\ -3.74166&-2.44949&0.\\ -3.74166&2.44949&0.\end{array}\right)$
i need to change the sign of the 2nd column and drop the 3rd:
$A^R = \left(\begin{array}{cc} 7.48331&0.\\ -3.74166&2.44949\\ -3.74166&-2.44949\end{array}\right)$
instead of my $A^Q$
$A^Q = \left(\begin{array}{cccc} 7.34847&0.&0.&0.\\ -2.44949&2.82843&0.&0.\\ 0.&-1.41421&0.&0.\\ -4.89898&-1.41421&0.&0.\end{array}\right)$
i need to change the sign of the 1st column and drop the last two:
$A^Q = \left(\begin{array}{cc} -7.34847&0.\\ 2.44949&2.82843\\ 0.&-1.41421\\ 4.89898&-1.41421\end{array}\right)$
having those, it’s quickest to recompute $S^R$ and $S^Q$ from the definitions. recall that
$X = \left(\begin{array}{ccc} -6&3&3\\ 2&1&-3\\ 0&-1&1\\ 4&-3&-1\end{array}\right)$
then
$S^R = X \ A^R$
= $\left(\begin{array}{ccc} -6&3&3\\ 2&1&-3\\ 0.&-1&1\\ 4&-3&-1\end{array}\right)$ x $\left(\begin{array}{cc} 7.48331&0.\\ -3.74166&2.44949\\ -3.74166&-2.44949\end{array}\right)$
= $\left(\begin{array}{cc} -67.3498&0\\ 22.4499&9.79796\\ 0.&-4.89898\\ 44.8999&-4.89898\end{array}\right)$
(yes, those are davis’ signs.) then we have
$S^Q = X^T \ A^Q$
= $\left(\begin{array}{cccc} -6&2&0&4\\ 3&1&-1&-3\\ 3&-3&1&-1\end{array}\right)$ x $\left(\begin{array}{cc} -7.34847&0.\\ 2.44949&2.82843\\ 0.&-1.41421\\ 4.89898&-1.41421\end{array}\right)$
= $\left(\begin{array}{cc} 68.5857&0\\ -34.2929&8.48528\\ -34.2929&-8.48528\end{array}\right)$
(yes, those too are davis’ signs.)
he has two plots. one is the so-called Q-mode loadings, the two nonzero columns of davis’ $A^Q$:
it would be informative for me to draw the so-called R-mode scores at this time, the two nonzero columns of davis’ $S^R$:
i have arranged for Mathematica® to use the same imagesize and aspect ratio. gee, this is the same picture, except for the scales. (in fact, the book drew the Q-mode loadings but labeled it R-mode scores. we see that it’s an understandable error.)
the other plot he drew was the R-mode loadings, the two nonzero columns of his $A^R$:
and i know you know we need to plot the Q-mode scores right now, the two nonzero columns of $S^Q$:
again, the scales have changed, but this is the same as the previous plot.
writing a little carelessly (exactly what do i mean by $\sqrt{\text{eigenvalues}}$ ?), the algebraic statements of what i have just shown you are :
$S^Q = A^R\ \sqrt{\text{eigenvalues}}$
$S^R = A^Q\ \sqrt{\text{eigenvalues}}$
hang on a second. suppose we compute $A^R$ and $S^R$; these two equations say that we can compute $A^Q$ from $S^R$ and $S^Q$ from $A^R$. but computing $A^R$ directly gave us an eigenvector matrix U; computing $A^Q$ directly gave us an eigenvector matrix V. these two equations say that we could have gotten $A^Q$ without ever computing V.
if we have so many observations that V is huge, this is a useful trick.
in addition, however, it leaves one wondering what’s to be gained from Q-mode analysis. we have not established that there’s nothing to be gained; but we can get whatever it is, if anything, without ever forming $XX^T$. (and yes, there is something to be gained. believe me!)
to confirm those relationships among the cut-down matrices, we need a 2×2 $\sqrt{\text{eigenvalues}}$ matrix instead of a 3×3 or 4×4 namely:
$\left(\begin{array}{cc} 9.16515&0.\\ 0.&3.4641\end{array}\right)$
let’s confirm $S^Q = A^R\ \sqrt{\text{eigenvalues}}$. the RHS is:
$\left(\begin{array}{cc} 7.48331&0.\\ -3.74166&2.44949\\ -3.74166&-2.44949\end{array}\right)$ x $\left(\begin{array}{cc} 9.16515&0.\\ 0.&3.4641\end{array}\right)$
= $\left(\begin{array}{cc} 68.5857&0.\\ -34.2929&8.48528\\ -34.2929&-8.48528\end{array}\right)$
and the LHS is:
$\left(\begin{array}{cc} 68.5857&0\\ -34.2929&8.48528\\ -34.2929&-8.48528\end{array}\right)$
which is what we wanted to see.
similarly, for $S^R = A^Q\ \sqrt{\text{eigenvalues}}$, the RHS is
$\left(\begin{array}{cc} -7.34847&0.\\ 2.44949&2.82843\\ 0.&-1.41421\\ 4.89898&-1.41421\end{array}\right)$ x $\left(\begin{array}{cc} 9.16515&0.\\ 0.&3.4641\end{array}\right)$
= $\left(\begin{array}{cc} -67.3498&0.\\ 22.4499&9.79796\\ 0.&-4.89898\\ 44.8999&-4.89898\end{array}\right)$
and the LHS is
$\left(\begin{array}{cc} -67.3498&0\\ 22.4499&9.79796\\ 0.&-4.89898\\ 44.8999&-4.89898\end{array}\right)$
as it should be.
so: if we cut down the matrices and we use davis’ signs, we see that the Q-mode FA could have been computed from the R-mode..
next, we will look at that using the SVD.