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: $\mathbf{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: $\mathbf{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: $\mathbf{nvar}$ – IntegerInput

On entry: $p$, the number of observed variables in the factor analysis.
Constraint:
${\mathbf{nvar}}\ge {\mathbf{nfac}}$.
 4: $\mathbf{nfac}$ – IntegerInput

On entry: $k$, the number of factors in the factor analysis.
Constraint:
${\mathbf{nfac}}\ge 1$.
 5: $\mathbf{fl}\left({\mathbf{ldfl}},{\mathbf{nfac}}\right)$ – Real (Kind=nag_wp) arrayInput

On entry:
$\Lambda $, the matrix of unrotated factor loadings as returned by
g03caf.
 6: $\mathbf{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: $\mathbf{psi}\left({\mathbf{nvar}}\right)$ – 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: $\mathbf{e}\left({\mathbf{nvar}}\right)$ – 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: $\mathbf{r}\left({\mathbf{ldr}},*\right)$ – 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: $\mathbf{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 ${\mathbf{ldr}}\ge 1$.
 11: $\mathbf{fs}\left({\mathbf{ldfs}},{\mathbf{nfac}}\right)$ – 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: $\mathbf{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: $\mathbf{wk}\left({\mathbf{nvar}}\right)$ – Real (Kind=nag_wp) arrayWorkspace

 14: $\mathbf{ifail}$ – IntegerInput/Output

On entry:
ifail must be set to
$0$,
$1\text{ or}1$. If you are unfamiliar with this argument you should refer to
Section 3.4 in How to Use the NAG Library and its Documentation 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 argument, 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}}=0$ or
$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.
Please consult the
X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the
Users' Note for your implementation for any additional implementationspecific information.
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.