nag_mv_fac_score (g03ccc) computes factor score coefficients from the result of fitting a factor analysis model by maximum likelihood as performed by
nag_mv_factor (g03cac).
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.
nag_mv_factor (g03cac) 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
nag_mv_factor (g03cac). Further, for models fitted by
nag_mv_factor (g03cac),
where
is the diagonal matrix of eigenvalues of the matrix
, as described in
nag_mv_factor (g03cac).
The factors may be orthogonally rotated using an orthogonal rotation matrix,
, as computed by
nag_mv_orthomax (g03bac). The factor scores for the rotated matrix are then given by
.
- 1:
– Nag_FacScoreMethodInput
-
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:
– Nag_FacRotationInput
-
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:
– const doubleInput
-
Note: the th element of the matrix is stored in .
On entry: the matrix of unrotated factor loadings,
, as returned by
nag_mv_factor (g03cac).
- 6:
– IntegerInput
-
On entry: the stride separating matrix column elements in the array
fl.
Constraint:
.
- 7:
– const doubleInput
-
On entry: the diagonal elements of
, as returned by
nag_mv_factor (g03cac).
Constraint:
, for .
- 8:
– const doubleInput
-
On entry: the eigenvalues of the matrix
, as returned by
nag_mv_factor (g03cac).
Constraint:
, for .
- 9:
– const doubleInput
-
Note: the th element of the matrix is stored in .
On entry: if
, then
r must contain the orthogonal rotation matrix,
, as returned by
nag_mv_orthomax (g03bac).
If
then
r need not be set.
- 10:
– IntegerInput
-
On entry: the stride separating matrix column elements in the array
r.
Constraint:
if then .
- 11:
– doubleOutput
-
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 stride separating matrix column elements in the array
fs.
Constraint:
.
- 13:
– NagError *Input/Output
-
The NAG error argument (see
Section 2.7 in How to Use the NAG Library and its Documentation).
Accuracy will depend on the accuracy requested when computing the estimated factor loadings using
nag_mv_factor (g03cac).
nag_mv_fac_score (g03ccc) is not threaded in any implementation.
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
nag_mv_z_scores (g03zac). The standardized variables are then post-multiplied by the factor score coefficients. This may be performed using functions from
the
f16 Chapter Introduction, for example
nag_dgemm (f16yac).
If principal component analysis is required, the function
nag_mv_prin_comp (g03aac) computes the principal component scores directly. Hence, the factor score coefficients are not needed.
The 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
nag_mv_factor (g03cac). The factor score coefficients are computed using the regression method.