The CALIS Procedure

Example 33.33 Longitudinal Factor Analysis

(View the complete code for this example.)

The following example (McDonald 1980) illustrates both the ability of PROC CALIS to formulate complex covariance structure analysis problems by the generalized COSAN matrix model and the use of programming statements to impose nonlinear constraints on the parameters. The example is a longitudinal factor analysis that uses the Swaminathan (1974) model. For m = 3 tests, k = 3 occasions, and r = 2 factors, the covariance structure model is formulated as follows:

bold upper Sigma equals bold upper F 1 bold upper F 2 bold upper F 3 bold upper L bold upper F 3 Superscript negative 1 Baseline bold upper F 2 Superscript negative 1 Baseline bold upper P left-parenthesis bold upper F 2 Superscript negative 1 Baseline right-parenthesis prime left-parenthesis bold upper F 3 Superscript negative 1 Baseline right-parenthesis prime bold upper L prime bold upper F prime 3 bold upper F prime 2 bold upper F prime 1 plus bold upper U squared
bold upper F 1 equals Start 3 By 3 Matrix 1st Row 1st Column bold upper B 1 2nd Column Blank 3rd Column Blank 2nd Row 1st Column Blank 2nd Column bold upper B 2 3rd Column Blank 3rd Row 1st Column Blank 2nd Column Blank 3rd Column bold upper B 3 EndMatrix comma bold upper F 2 equals Start 3 By 3 Matrix 1st Row 1st Column bold upper I 2 2nd Column Blank 3rd Column Blank 2nd Row 1st Column Blank 2nd Column bold upper D 2 3rd Column Blank 3rd Row 1st Column Blank 2nd Column Blank 3rd Column bold upper D 2 EndMatrix comma bold upper F 3 equals Start 3 By 3 Matrix 1st Row 1st Column bold upper I 2 2nd Column Blank 3rd Column Blank 2nd Row 1st Column Blank 2nd Column bold upper I 2 3rd Column Blank 3rd Row 1st Column Blank 2nd Column Blank 3rd Column bold upper D 3 EndMatrix
bold upper L equals Start 3 By 3 Matrix 1st Row 1st Column bold upper I 2 2nd Column 0 3rd Column 0 2nd Row 1st Column bold upper I 2 2nd Column bold upper I 2 3rd Column 0 3rd Row 1st Column bold upper I 2 2nd Column bold upper I 2 3rd Column bold upper I 2 EndMatrix comma bold upper P equals Start 3 By 3 Matrix 1st Row 1st Column bold upper I 2 2nd Column Blank 3rd Column Blank 2nd Row 1st Column Blank 2nd Column bold upper S 2 3rd Column Blank 3rd Row 1st Column Blank 2nd Column Blank 3rd Column bold upper S 3 EndMatrix comma bold upper U equals Start 3 By 3 Matrix 1st Row 1st Column bold upper U 11 2nd Column bold upper U 12 3rd Column bold upper U 13 2nd Row 1st Column bold upper U 21 2nd Column bold upper U 22 3rd Column bold upper U 23 3rd Row 1st Column bold upper U 31 2nd Column bold upper U 32 3rd Column bold upper U 33 EndMatrix
bold upper S 2 equals bold upper I 2 minus bold upper D 2 squared comma bold upper S 3 equals bold upper I 2 minus bold upper D 3 squared

The Swaminathan longitudinal factor model assumes that the factor scores for each (m) common factor change from occasion to occasion (k) according to a first-order autoregressive scheme. The matrix bold upper F 1 contains the k factor loading matrices bold upper B 1, bold upper B 2, and bold upper B 3 (each is n times m). The matrices bold upper D 2 comma bold upper D 3 comma bold upper S 2 comma bold upper S 3 and bold upper U Subscript i j Baseline comma i comma j equals 1 comma ellipsis comma k comma are diagonal, and the matrices bold upper D Subscript i and bold upper S Subscript i Baseline comma i equals 2 comma ellipsis comma k comma are subjected to the constraint

bold upper S Subscript i Baseline plus bold upper D Subscript i Superscript 2 Baseline equals bold upper I

Although the covariance structure model looks pretty complicated, it poses no problem for the COSAN model specifications. Since the constructed correlation matrix given by McDonald (1980) is singular, only unweighted least squares (METHOD=LS) estimates can be computed. The following statements specify the COSAN model for the correlation structures.

Title "Swaminathan's Longitudinal Factor Model, Data: McDONALD(1980)";
Title2 "Constructed Singular Correlation Matrix, GLS & ML not possible";
data Mcdon(TYPE=CORR);
   _TYPE_ = 'CORR'; INPUT _NAME_ $ obs1-obs9;
   datalines;
obs1  1.000    .      .      .      .      .      .      .      .
obs2   .100  1.000    .      .      .      .      .      .      .
obs3   .250   .400  1.000    .      .      .      .      .      .
obs4   .720   .108   .270  1.000    .      .      .      .      .
obs5   .135   .740   .380   .180  1.000    .      .      .      .
obs6   .270   .318   .800   .360   .530  1.000    .      .      .
obs7   .650   .054   .135   .730   .090   .180  1.000    .      .
obs8   .108   .690   .196   .144   .700   .269   .200  1.000    .
obs9   .189   .202   .710   .252   .336   .760   .350   .580  1.000
;
proc calis data=Mcdon method=ls nobs=100 corr;
   cosan
      var = obs1-obs9,
      F1(6,GEN) * F2(6,DIA) * F3(6,DIA) * L(6,LOW) * F3(6,DIA,INV)
                * F2(6,DIA,INV) * P(6,DIA) + U(9,SYM);
   matrix F1
            [1 , @1] = x1-x3,
            [2 , @2] = x4-x5,
            [4 , @3] = x6-x8,
            [5 , @4] = x9-x10,
            [7 , @5] = x11-x13,
            [8 , @6] = x14-x15;
   matrix F2
            [1,1]= 2 * 1. x16 x17 x16 x17;
   matrix F3
            [1,1]= 4 * 1. x18 x19;
   matrix L
            [1,1]= 6 * 1.,
            [3,1]= 4 * 1.,
            [5,1]= 2 * 1.;
   matrix P
            [1,1]= 2 * 1. x20-x23;
   matrix U
            [1,1]= x24-x32,
            [4,1]= x33-x38,
            [7,1]= x39-x41;
   bounds 0. <= x24-x32,
         -1. <= x16-x19 <= 1.;
   /* SAS programming statements for dependent parameters */
   x20 = 1. - x16 * x16;
   x21 = 1. - x17 * x17;
   x22 = 1. - x18 * x18;
   x23 = 1. - x19 * x19;
run;

In the PROC CALIS statement, you use the NOBS= option to specify the number of observations. The CORR option requests the analysis of the correlation matrix.

In the COSAN statement, you list the observed variables for the analysis in the VAR= option. Then you specify the formula for the covariance structures. Notice that in the covariance structure formula, some matrices are specified twice. That is, matrix bold upper F Baseline bold 2 and bold upper F Baseline bold 3 appear in two different places. Matrices with the same name means that they are identical—which certainly makes sense. In addition, you can apply different transformations to the same matrix in different locations of the matrix formula. For example, you do not transform matrix bold upper F Baseline bold 2 in the first location, but the same matrix is inverted (INV) later in the expression. Similarly for matrix bold upper F Baseline bold 3.

Next, you define the parameters in the six distinct model matrices by six MATRIX statements. Each matrix has some specific patterns under the covariance structure model. For the bold upper F Baseline bold 1 matrix, it has the following pattern for the free parameters in the model:

            col1  col2  col3  col4  col5  col6
     row1    x
     row2    x     x
     row3    x     x
     row4                x
     row5                x     x
     row6                x     x
     row7                            x
     row8                            x     x
     row9                            x     x

To specify these parameters, you can use some shorthand notation in the MATRIX statement. For example, in the first entry of the MATRIX statement for matrix bold upper F Baseline bold 1, you use the notation [1,@1]. This means that the parameter specification starts with the [1,1] element and proceeds to the next element while fixing the column number at 1. Hence, parameters x1x3 are specified for the bold upper F Baseline bold 1 left-bracket 1 comma 1 right-bracket, bold upper F Baseline bold 1 left-bracket 2 comma 1 right-bracket, and bold upper F Baseline bold 1 left-bracket 3 comma 1 right-bracket elements, respectively. Similarly, you specify other parameters in the bold upper F Baseline bold 1 matrix in a column by column fashion.

If you do not use the @ sign in the specification, the parameters are assigned differently. For example, in the specification of the bold upper L matrix, the first entry in the corresponding MATRIX statement also starts with the [1,1] element. But it proceeds down to [2,2], [3,3], and so on because the @ sign is not used to fix any column or row number. As a result, the MATRIX statement for bold upper L specifies the following pattern:

            col1  col2  col3  col4  col5  col6
     row1    1
     row2          1
     row3    1           1
     row4          1           1
     row5    1           1           1
     row6          1           1           1

The unspecified elements are fixed zeros in the model.

Similarly, you specify the diagonal matrices bold upper F Baseline bold 2, bold upper F Baseline bold 3, and bold upper P, and the symmetric matrix bold upper U.

You also set bounds for some parameters in the BOUNDS statement and some dependent parameters in the SAS programming statements.

Output 33.33.1 shows the correlation structures and the model matrices in the analysis. All appear to be intended.

Output 33.33.1: The Correlation Structures and Model Matrices of the Longitudinal Factor Model

COSAN Model Structures
Sigma = F1*F2*F3*L*inv(F3)*inv(F2)*P*(inv(F2))`*(inv(F3))`*L`*F3`*F2`*F1` + U

Summary of Model Matrices
Matrix N Row N Col Matrix Type
F1 9 6 GEN: Rectangular
F2 6 6 DIA: Diagonal
F3 6 6 DIA: Diagonal
L 6 6 LOW: L Triangular
P 6 6 DIA: Diagonal
U 9 9 SYM: Symmetric


PROC CALIS finds a converged solution for the estimation problem. Output 33.33.2, Output 33.33.3, and Output 33.33.4 show the estimation results of the bold upper F Baseline bold 1, bold upper F Baseline bold 2, and bold upper F Baseline bold 3 matrices, respectively.

Output 33.33.2: Estimation of the bold upper F Baseline bold 1 Matrix of the Longitudinal Factor Model

Model Matrix F1
(9 x 6 General Rectangular Matrix)
  Col1 Col2 Col3 Col4 Col5 Col6
obs1
0.3515
[x1]
0
 
0
 
0
 
0
 
0
 
obs2
0.2871
[x2]
0.9528
[x4]
0
 
0
 
0
 
0
 
obs3
0.7101
[x3]
0.2059
[x5]
0
 
0
 
0
 
0
 
obs4
0
 
0
 
0.4204
[x6]
0
 
0
 
0
 
obs5
0
 
0
 
0.4303
[x7]
0.9027
[x9]
0
 
0
 
obs6
0
 
0
 
0.8591
[x8]
0.1772
[x10]
0
 
0
 
obs7
0
 
0
 
0
 
0
 
0.3487
[x11]
0
 
obs8
0
 
0
 
0
 
0
 
0.5924
[x12]
-0.1971
[x14]
obs9
0
 
0
 
0
 
0
 
0.9987
[x13]
0.0871
[x15]


Output 33.33.3: Estimation of the bold upper F Baseline bold 2 Matrix of the Longitudinal Factor Model

Model Matrix F2
(6 x 6 Diagonal Matrix)
  Col1 Col2 Col3 Col4 Col5 Col6
Row1
1.0000
 
0
 
0
 
0
 
0
 
0
 
Row2
0
 
1.0000
 
0
 
0
 
0
 
0
 
Row3
0
 
0
 
0.8939
[x16]
0
 
0
 
0
 
Row4
0
 
0
 
0
 
0.5806
[x17]
0
 
0
 
Row5
0
 
0
 
0
 
0
 
0.8939
[x16]
0
 
Row6
0
 
0
 
0
 
0
 
0
 
0.5806
[x17]


Output 33.33.4: Estimation of the bold upper F Baseline bold 3 Matrix of the Longitudinal Factor Model

Model Matrix F3
(6 x 6 Diagonal Matrix)
  Col1 Col2 Col3 Col4 Col5 Col6
Row1
1.0000
 
0
 
0
 
0
 
0
 
0
 
Row2
0
 
1.0000
 
0
 
0
 
0
 
0
 
Row3
0
 
0
 
1.0000
 
0
 
0
 
0
 
Row4
0
 
0
 
0
 
1.0000
 
0
 
0
 
Row5
0
 
0
 
0
 
0
 
0.5963
[x18]
0
 
Row6
0
 
0
 
0
 
0
 
0
 
1.0000
[x19]


Output 33.33.5 shows the estimation results of the bold upper L matrix, which is a fixed matrix that contains only 0 or 1 for its elements.

Output 33.33.5: Estimation of the bold upper L Matrix of the Longitudinal Factor Model

Model Matrix L
(6 x 6 Lower Triangular Matrix)
  Col1 Col2 Col3 Col4 Col5 Col6
Row1 1.0000 0 0 0 0 0
Row2 0 1.0000 0 0 0 0
Row3 1.0000 0 1.0000 0 0 0
Row4 0 1.0000 0 1.0000 0 0
Row5 1.0000 0 1.0000 0 1.0000 0
Row6 0 1.0000 0 1.0000 0 1.0000


Output 33.33.6 shows the estimation results of the bold upper P matrix. Notice that parameter estimate x23 falls on the lower boundary at zero.

Output 33.33.6: Estimation of the bold upper P Matrix of the Longitudinal Factor Model

Model Matrix P
(6 x 6 Diagonal Matrix)
  Col1 Col2 Col3 Col4 Col5 Col6
Row1
1.0000
 
0
 
0
 
0
 
0
 
0
 
Row2
0
 
1.0000
 
0
 
0
 
0
 
0
 
Row3
0
 
0
 
0.2010
[x20]
0
 
0
 
0
 
Row4
0
 
0
 
0
 
0.6629
[x21]
0
 
0
 
Row5
0
 
0
 
0
 
0
 
0.6444
[x22]
0
 
Row6
0
 
0
 
0
 
0
 
0
 
0
[x23]


In fact, PROC CALIS routinely checks for zero values for the estimates on the diagonal of the central symmetric matrices. In this case, you get the following messages regarding the estimation of matrix bold upper P:

WARNING: Although all predicted variances for the observed variables are
         positive, the corresponding predicted covariance matrix is not
         positive definite. It has one negative eigenvalue.
WARNING: The estimated variance of variable 6 is essentially zero in the
         central matrix P of term 1 of the COSAN model.
WARNING: The central matrix P of term 1 of the COSAN model is not positive
         definite. It has one zero eigenvalue.

Output 33.33.7 shows the estimation results of the bold upper U matrix. Parameter estimates x28 and x32 fall on the lower boundary at zero. PROC CALIS issues the following messages regarding the estimation of matrix bold upper U:

WARNING: The estimated variance of obs5 is essentially zero in the central
         matrix U of term 2 of the COSAN model.
WARNING: The estimated variance of obs9 is essentially zero in the central
         matrix U of term 2 of the COSAN model.
WARNING: The central matrix U of term 2 of the COSAN model is not positive
         definite. It has 3 negative eigenvalues.

Output 33.33.7: Estimation of the bold upper U Matrix of the Longitudinal Factor Model

Model Matrix U
(9 x 9 Symmetric Matrix)
  obs1 obs2 obs3 obs4 obs5 obs6 obs7 obs8 obs9
obs1
0.8764
[x24]
0
 
0
 
0.5879
[x33]
0
 
0
 
0.5847
[x39]
0
 
0
 
obs2
0
 
0.009683
[x25]
0
 
0
 
0.1302
[x34]
0
 
0
 
0.7084
[x40]
0
 
obs3
0
 
0
 
0.4533
[x26]
0
 
0
 
0.2335
[x35]
0
 
0
 
0.3215
[x41]
obs4
0.5879
[x33]
0
 
0
 
0.8233
[x27]
0
 
0
 
0.6426
[x36]
0
 
0
 
obs5
0
 
0.1302
[x34]
0
 
0
 
0
[x28]
0
 
0
 
0.7259
[x37]
0
 
obs6
0
 
0
 
0.2335
[x35]
0
 
0
 
0.2305
[x29]
0
 
0
 
0.2329
[x38]
obs7
0.5847
[x39]
0
 
0
 
0.6426
[x36]
0
 
0
 
0.8784
[x30]
0
 
0
 
obs8
0
 
0.7084
[x40]
0
 
0
 
0.7259
[x37]
0
 
0
 
0.6102
[x31]
0
 
obs9
0
 
0
 
0.3215
[x41]
0
 
0
 
0.2329
[x38]
0
 
0
 
0
[x32]


Because this formulation of Swaminathan’s model in general leads to an unidentified problem, the results given here are different from those reported by McDonald (1980). The displayed output of PROC CALIS also indicates that the fitted central model matrices bold upper P and bold upper U are not positive-definite. The BOUNDS statement constrains the diagonals of the matrices bold upper P and bold upper U to be nonnegative, but this cannot prevent bold upper U from having three negative eigenvalues. The fact that many of the published results for more complex models in covariance structure analysis are connected to unidentified problems implies that more theoretical work should be done to study the general features of such models.

Last updated: December 09, 2022