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
variables, observed on
individuals, in terms of a smaller number,
, 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,
, and the diagonal matrix of variances of the unique components,
. To obtain estimates of the factors, a
by
matrix of factor score coefficients,
, is formed. The estimated vector of factor scores,
, is then given by:
where
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
is the diagonal matrix of eigenvalues of the matrix
, as described in
g03caf.
The factors may be orthogonally rotated using an orthogonal rotation matrix,
, as computed by
g03baf. The factor scores for the rotated matrix are then given by
.
- 1: – Character(1)Input
-
On entry: indicates which method is to be used to compute the factor score coefficients.
- The regression method is used.
- Bartlett's method is used.
Constraint:
or .
- 2: – Character(1)Input
-
On entry: indicates whether a rotation is to be applied.
- A rotation will be applied to the coefficients and the rotation matrix, , must be given in r.
- No rotation is applied.
Constraint:
or .
- 3: – IntegerInput
-
On entry: , the number of observed variables in the factor analysis.
Constraint:
.
- 4: – IntegerInput
-
On entry: , the number of factors in the factor analysis.
Constraint:
.
- 5: – Real (Kind=nag_wp) arrayInput
-
On entry:
, the matrix of unrotated factor loadings as returned by
g03caf.
- 6: – IntegerInput
-
On entry: the first dimension of the array
fl as declared in the (sub)program from which
g03ccf is called.
Constraint:
.
- 7: – Real (Kind=nag_wp) arrayInput
-
On entry: the diagonal elements of
, as returned by
g03caf.
Constraint:
, for .
- 8: – Real (Kind=nag_wp) arrayInput
-
On entry: the eigenvalues of the matrix
, as returned by
g03caf.
Constraint:
, for .
- 9: – Real (Kind=nag_wp) arrayInput
-
Note: the second dimension of the array
r
must be at least
if
and at least
if
.
On entry: if
,
r must contain the orthogonal rotation matrix,
, as returned by
g03baf.
If
,
r need not be set.
- 10: – IntegerInput
-
On entry: the first dimension of the array
r as declared in the (sub)program from which
g03ccf is called.
Constraints:
- if , ;
- otherwise .
- 11: – Real (Kind=nag_wp) arrayOutput
-
On exit: the matrix of factor score coefficients, .
contains the factor score coefficient for the th factor and the th observed variable, for and .
- 12: – IntegerInput
-
On entry: the first dimension of the array
fs as declared in the (sub)program from which
g03ccf is called.
Constraint:
.
- 13: – Real (Kind=nag_wp) arrayWorkspace
-
- 14: – IntegerInput/Output
-
On entry:
ifail must be set to
,
. 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
is recommended. If the output of error messages is undesirable, then the value
is recommended. Otherwise, if you are not familiar with this argument, the recommended value is
.
When the value is used it is essential to test the value of ifail on exit.
On exit:
unless the routine detects an error or a warning has been flagged (see
Section 6).
If on entry
or
, 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 implementation-specific 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 post-multiplied 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.