G03CCF computes factor score coefficients from the result of fitting a factor analysis model by maximum likelihood as performed by
G03CAF.
SUBROUTINE G03CCF ( |
METHOD, ROTATE, NVAR, NFAC, FL, LDFL, PSI, E, R, LDR, FS, LDFS, WK, IFAIL) |
INTEGER |
NVAR, NFAC, LDFL, LDR, LDFS, IFAIL |
REAL (KIND=nag_wp) |
FL(LDFL,NFAC), PSI(NVAR), E(NVAR), R(LDR,*), FS(LDFS,NFAC), WK(NVAR) |
CHARACTER(1) |
METHOD, ROTATE |
|
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: METHOD – 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: ROTATE – 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: NVAR – INTEGERInput
On entry: , the number of observed variables in the factor analysis.
Constraint:
.
- 4: NFAC – INTEGERInput
On entry: , the number of factors in the factor analysis.
Constraint:
.
- 5: FL(LDFL,NFAC) – REAL (KIND=nag_wp) arrayInput
On entry:
, 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:
.
- 7: PSI(NVAR) – REAL (KIND=nag_wp) arrayInput
On entry: the diagonal elements of
, as returned by
G03CAF.
Constraint:
, for .
- 8: E(NVAR) – REAL (KIND=nag_wp) arrayInput
On entry: the eigenvalues of the matrix
, as returned by
G03CAF.
Constraint:
, for .
- 9: R(LDR,) – 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: LDR – 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: FS(LDFS,NFAC) – 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: LDFS – INTEGERInput
On entry: the first dimension of the array
FS as declared in the (sub)program from which G03CCF is called.
Constraint:
.
- 13: WK(NVAR) – REAL (KIND=nag_wp) arrayWorkspace
- 14: IFAIL – INTEGERInput/Output
-
On entry:
IFAIL must be set to
,
. 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
is recommended. If the output of error messages is undesirable, then the value
is recommended. Otherwise, if you are not familiar with this parameter, 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.
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.