G03CCF computes factor score coefficients from the result of fitting a factor analysis model by maximum likelihood as performed by
G03CAF.
A factor analysis model aims to account for the covariances among
$p$ variables, observed on
$n$ individuals, in terms of a smaller number,
$k$, of unobserved variables or factors. The values of the factors for an individual are known as factor scores.
G03CAF fits the factor analysis model by maximum likelihood and returns the estimated factor loading matrix,
$\Lambda $, and the diagonal matrix of variances of the unique components,
$\Psi $. To obtain estimates of the factors, a
$p$ by
$k$ matrix of factor score coefficients,
$\Phi $, is formed. The estimated vector of factor scores,
$\hat{f}$, is then given by:
where
$x$ is the vector of observed variables for an individual.
There are two commonly used methods of obtaining factor score coefficients.
The regression method:
and Bartlett's method:
See
Lawley and Maxwell (1971) for details of both methods. In the regression method as given above, it is assumed that the factors are not correlated and have unit variance; this is true for models fitted by
G03CAF. Further, for models fitted by
G03CAF,
where
$\Theta $ is the diagonal matrix of eigenvalues of the matrix
${S}^{*}$, as described in
G03CAF.
The factors may be orthogonally rotated using an orthogonal rotation matrix,
$R$, as computed by
G03BAF. The factor scores for the rotated matrix are then given by
$\Lambda R$.
 1: METHOD – CHARACTER(1)Input
On entry: indicates which method is to be used to compute the factor score coefficients.
 ${\mathbf{METHOD}}=\text{'R'}$
 The regression method is used.
 ${\mathbf{METHOD}}=\text{'B'}$
 Bartlett's method is used.
Constraint:
${\mathbf{METHOD}}=\text{'B'}$ or $\text{'R'}$.
 2: ROTATE – CHARACTER(1)Input
On entry: indicates whether a rotation is to be applied.
 ${\mathbf{ROTATE}}=\text{'R'}$
 A rotation will be applied to the coefficients and the rotation matrix, $R$, must be given in R.
 ${\mathbf{ROTATE}}=\text{'U'}$
 No rotation is applied.
Constraint:
${\mathbf{ROTATE}}=\text{'R'}$ or $\text{'U'}$.
 3: NVAR – INTEGERInput
On entry: $p$, the number of observed variables in the factor analysis.
Constraint:
${\mathbf{NVAR}}\ge {\mathbf{NFAC}}$.
 4: NFAC – INTEGERInput
On entry: $k$, the number of factors in the factor analysis.
Constraint:
${\mathbf{NFAC}}\ge 1$.
 5: FL(LDFL,NFAC) – REAL (KIND=nag_wp) arrayInput
On entry:
$\Lambda $, the matrix of unrotated factor loadings as returned by
G03CAF.
 6: LDFL – INTEGERInput
On entry: the first dimension of the array
FL as declared in the (sub)program from which G03CCF is called.
Constraint:
${\mathbf{LDFL}}\ge {\mathbf{NVAR}}$.
 7: PSI(NVAR) – REAL (KIND=nag_wp) arrayInput
On entry: the diagonal elements of
$\Psi $, as returned by
G03CAF.
Constraint:
${\mathbf{PSI}}\left(\mathit{i}\right)>0.0$, for $\mathit{i}=1,2,\dots ,p$.
 8: E(NVAR) – REAL (KIND=nag_wp) arrayInput
On entry: the eigenvalues of the matrix
${S}^{*}$, as returned by
G03CAF.
Constraint:
${\mathbf{E}}\left(\mathit{i}\right)>1.0$, for $\mathit{i}=1,2,\dots ,p$.
 9: R(LDR,$*$) – REAL (KIND=nag_wp) arrayInput

Note: the second dimension of the array
R
must be at least
$1$ if
${\mathbf{ROTATE}}=\text{'U'}$ and at least
${\mathbf{NFAC}}$ if
${\mathbf{ROTATE}}=\text{'R'}$.
On entry: if
${\mathbf{ROTATE}}=\text{'R'}$,
R must contain the orthogonal rotation matrix,
$R$, as returned by
G03BAF.
If
${\mathbf{ROTATE}}=\text{'U'}$,
R need not be set.
 10: LDR – INTEGERInput
On entry: the first dimension of the array
R as declared in the (sub)program from which G03CCF is called.
Constraints:
 if ${\mathbf{ROTATE}}=\text{'R'}$, ${\mathbf{LDR}}\ge {\mathbf{NFAC}}$;
 otherwise $1$.
 11: FS(LDFS,NFAC) – REAL (KIND=nag_wp) arrayOutput
On exit: the matrix of factor score coefficients, $\Phi $.
${\mathbf{FS}}\left(\mathit{i},\mathit{j}\right)$ contains the factor score coefficient for the $\mathit{j}$th factor and the $\mathit{i}$th observed variable, for $\mathit{i}=1,2,\dots ,p$ and $\mathit{j}=1,2,\dots ,k$.
 12: LDFS – INTEGERInput
On entry: the first dimension of the array
FS as declared in the (sub)program from which G03CCF is called.
Constraint:
${\mathbf{LDFS}}\ge {\mathbf{NVAR}}$.
 13: WK(NVAR) – REAL (KIND=nag_wp) arrayWorkspace
 14: IFAIL – INTEGERInput/Output

On entry:
IFAIL must be set to
$0$,
$1\text{ or}1$. If you are unfamiliar with this parameter you should refer to
Section 3.3 in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value
$1\text{ or}1$ is recommended. If the output of error messages is undesirable, then the value
$1$ is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is
$0$.
When the value $\mathbf{1}\text{ or}\mathbf{1}$ is used it is essential to test the value of IFAIL on exit.
On exit:
${\mathbf{IFAIL}}={\mathbf{0}}$ unless the routine detects an error or a warning has been flagged (see
Section 6).
If on entry
${\mathbf{IFAIL}}={\mathbf{0}}$ or
${{\mathbf{1}}}$, explanatory error messages are output on the current error message unit (as defined by
X04AAF).
Accuracy will depend on the accuracy requested when computing the estimated factor loadings using
G03CAF.
To compute the factor scores using the factor score coefficients the values for the observed variables first need to be standardized by subtracting the sample means and, if the factor analysis is based upon a correlation matrix, dividing by the sample standard deviations. This may be performed using
G03ZAF. The standardized variables are then postmultiplied by the factor score coefficients. This may be performed using routines from
Chapter F06,
for example
F06YAF (DGEMM).
If principal component analysis is required the routine
G03AAF computes the principal component scores directly. Hence, the factor score coefficients are not needed.
This example is taken from
Lawley and Maxwell (1971). The correlation matrix for 220 observations on six school subjects is input and a factor analysis model with two factors fitted using
G03CAF. The factor score coefficients are computed using the regression method.