UCLA Academic Technology Services HomeServicesClassesContactJobs
Search

SAS Textbook Examples
Applied Longitudinal Data Analysis: Modeling Change and Event Occurrence
by Judith D. Singer and John B. Willett
Chapter 7: Examining the multilevel model’s error covariance structure


Table 7.2 on page 246.

title1 'Table 7.2: Conventional multilevel model for change: Opposite naming data';
title2 'Restricted ML';
proc mixed data='c:\alda\opposites_pp' noclprint noinfo covtest noitprint method=reml;
  class id;
  model opp=time ccog time*ccog / solution ddfm=bw;
  random intercept time / sub=id type=un;
run;
Table 7.2: Conventional multilevel model for change: Opposite naming data
Restricted ML
The Mixed Procedure

                  Covariance Parameter Estimates

                                    Standard         Z
Cov Parm     Subject    Estimate       Error     Value        Pr Z
UN(1,1)      ID          1236.41      332.40      3.72      <.0001
UN(2,1)      ID          -178.23     85.4298     -2.09      0.0370
UN(2,2)      ID           107.25     34.6767      3.09      0.0010
Residual                  159.48     26.9566      5.92      <.0001
           Fit Statistics
-2 Res Log Likelihood          1260.3
AIC (smaller is better)        1268.3
AICC (smaller is better)       1268.6
BIC (smaller is better)        1274.5
  Null Model Likelihood Ratio Test
    DF    Chi-Square      Pr > ChiSq
     3        120.72          <.0001
                   Solution for Fixed Effects

                         Standard
Effect       Estimate       Error      DF    t Value    Pr > |t|
Intercept      164.37      6.2061      33      26.49      <.0001
TIME          26.9600      1.9939     103      13.52      <.0001
CCOG          -0.1136      0.5040      33      -0.23      0.8231
TIME*CCOG      0.4329      0.1619     103       2.67      0.0087
        Type 3 Tests of Fixed Effects

              Num     Den
Effect         DF      DF    F Value    Pr > F
TIME            1     103     182.83    <.0001
CCOG            1      33       0.05    0.8231
TIME*CCOG       1     103       7.15    0.0087

Table 7.3 on pages 258-259.

title1 'Table 7.3: Conventional multilevel model for change: Opposite naming data';
proc mixed data='c:\alda\opposites_pp' noclprint noinfo covtest noitprint method=reml;
  title2 'Comparing alternative error structures at level-1, with none at level-2 (REML)';
  title3 'completely unstructured';
  class id wave;
  model opp=time ccog time*ccog / solution ddfm=bw notest;
  repeated wave / subject=id type=un r;
run;
 
proc mixed data='c:\alda\opposites_pp' noclprint noinfo covtest noitprint method=reml;
  title3 'compound symmetric';
  class id wave;
  model opp=time ccog time*ccog / solution ddfm=bw notest;
  repeated wave / subject=id type=cs r;
run;
 
proc mixed data='c:\alda\opposites_pp' noclprint noinfo covtest noitprint method=reml;
  title3 'compound symmetric heterogeneous CSH';
  class id wave;
  model opp=time ccog time*ccog / solution ddfm=bw notest;
  repeated wave / subject=id type=csh r;
run;
 
proc mixed data='c:\alda\opposites_pp' noclprint noinfo covtest noitprint method=reml;
  title3 'ar(1)';
  class id wave;
  model opp=time ccog time*ccog / solution ddfm=bw notest;
  repeated wave / subject=id type=ar(1) r;
run;
 
proc mixed data='c:\alda\opposites_pp' noclprint noinfo covtest noitprint method=reml;
  title3 'ar(1)heterogeneous';
  class id wave;
  model opp=time ccog time*ccog / solution ddfm=bw notest;
  repeated wave / subject=id type=arh(1) r;
run;
 
proc mixed data='c:\alda\opposites_pp' noclprint noinfo covtest noitprint method=reml;
  title3 'Toeplitz';
  class id wave;
  model opp=time ccog time*ccog / solution ddfm=bw notest;
  repeated wave / subject=id type=toep r;
run;

Table 7.3: Conventional multilevel model for change: Opposite naming data
Comparing alternative error structures at level-1, with none at level-2 (REML)
completely unstructured
The Mixed Procedure

             Estimated R Matrix for ID 1

 Row        Col1        Col2        Col3        Col4
   1     1344.84     1005.57      946.05      583.12
   2     1005.57     1150.30     1028.43      846.49
   3      946.05     1028.43     1235.65      969.24
   4      583.12      846.49      969.24     1205.89
                 Covariance Parameter Estimates

                                   Standard         Z
Cov Parm    Subject    Estimate       Error     Value        Pr Z
UN(1,1)     ID          1344.84      330.16      4.07      <.0001
UN(2,1)     ID          1005.57      277.88      3.62      0.0003
UN(2,2)     ID          1150.30      282.13      4.08      <.0001
UN(3,1)     ID           946.05      276.91      3.42      0.0006
UN(3,2)     ID          1028.43      272.75      3.77      0.0002
UN(3,3)     ID          1235.65      301.84      4.09      <.0001
UN(4,1)     ID           583.12      243.58      2.39      0.0167
UN(4,2)     ID           846.49      252.08      3.36      0.0008
UN(4,3)     ID           969.24      270.78      3.58      0.0003
UN(4,4)     ID          1205.89      296.70      4.06      <.0001
           Fit Statistics
-2 Res Log Likelihood          1255.8
AIC (smaller is better)        1275.8
AICC (smaller is better)       1277.5
BIC (smaller is better)        1291.3
  Null Model Likelihood Ratio Test
    DF    Chi-Square      Pr > ChiSq
     9        125.22          <.0001

                   Solution for Fixed Effects

                         Standard
Effect       Estimate       Error      DF    t Value    Pr > |t|
Intercept      165.83      5.9523      33      27.86      <.0001
TIME          26.5843      1.9257      33      13.80      <.0001
CCOG         -0.07408      0.4834      33      -0.15      0.8791
TIME*CCOG      0.4583      0.1564      33       2.93      0.0061
Table 7.3: Conventional multilevel model for change: Opposite naming data
Comparing alternative error structures at level-1, with none at level-2 (REML)
compound symmetric
The Mixed Procedure

             Estimated R Matrix for ID 1

 Row        Col1        Col2        Col3        Col4
   1     1231.36      900.07      900.07      900.07
   2      900.07     1231.36      900.07      900.07
   3      900.07      900.07     1231.36      900.07
   4      900.07      900.07      900.07     1231.36
                  Covariance Parameter Estimates

                                    Standard         Z
Cov Parm     Subject    Estimate       Error     Value        Pr Z
CS           ID           900.07      242.25      3.72      0.0002
Residual                  331.28     46.1633      7.18      <.0001
           Fit Statistics
-2 Res Log Likelihood          1287.0
AIC (smaller is better)        1291.0
AICC (smaller is better)       1291.1
BIC (smaller is better)        1294.2
  Null Model Likelihood Ratio Test
    DF    Chi-Square      Pr > ChiSq
     1         93.96          <.0001
                   Solution for Fixed Effects

                         Standard
Effect       Estimate       Error      DF    t Value    Pr > |t|
Intercept      164.37      5.6870      33      28.90      <.0001
TIME          26.9600      1.3759     103      19.59      <.0001
CCOG          -0.1136      0.4619      33      -0.25      0.8073
TIME*CCOG      0.4329      0.1117     103       3.87      0.0002
Table 7.3: Conventional multilevel model for change: Opposite naming data
Comparing alternative error structures at level-1, with none at level-2 (REML)
compound symmetric heterogeneous CSH
The Mixed Procedure

             Estimated R Matrix for ID 1

 Row        Col1        Col2        Col3        Col4
   1     1438.04      912.85      946.52     1009.46
   2      912.85     1067.67      815.57      869.80
   3      946.52      815.57     1147.87      901.88
   4     1009.46      869.80      901.88     1305.61
                 Covariance Parameter Estimates

Cov                               Standard         Z
Parm       Subject    Estimate       Error     Value        Pr Z
Var(1)     ID          1438.04      354.99      4.05      <.0001
Var(2)     ID          1067.67      255.23      4.18      <.0001
Var(3)     ID          1147.87      273.55      4.20      <.0001
Var(4)     ID          1305.61      323.74      4.03      <.0001
CSH        ID           0.7367     0.05971     12.34      <.0001
           Fit Statistics
-2 Res Log Likelihood          1285.0
AIC (smaller is better)        1295.0
AICC (smaller is better)       1295.4
BIC (smaller is better)        1302.7
  Null Model Likelihood Ratio Test
    DF    Chi-Square      Pr > ChiSq
     4         96.06          <.0001
                   Solution for Fixed Effects

                         Standard
Effect       Estimate       Error      DF    t Value    Pr > |t|
Intercept      164.32      5.6936      33      28.86      <.0001
TIME          26.9260      1.4192     103      18.97      <.0001
CCOG          -0.1937      0.4624      33      -0.42      0.6780
TIME*CCOG      0.4397      0.1153     103       3.81      0.0002
Table 7.3: Conventional multilevel model for change: Opposite naming data
Comparing alternative error structures at level-1, with none at level-2 (REML)
ar(1)
The Mixed Procedure

             Estimated R Matrix for ID 1

 Row        Col1        Col2        Col3        Col4
   1     1256.72     1037.24      856.08      706.57
   2     1037.24     1256.72     1037.24      856.08
   3      856.08     1037.24     1256.72     1037.24
   4      706.57      856.08     1037.24     1256.72
                  Covariance Parameter Estimates

                                    Standard         Z
Cov Parm     Subject    Estimate       Error     Value        Pr Z
AR(1)        ID           0.8253     0.03948     20.91      <.0001
Residual                 1256.72      248.25      5.06      <.0001
           Fit Statistics
-2 Res Log Likelihood          1265.9
AIC (smaller is better)        1269.9
AICC (smaller is better)       1270.0
BIC (smaller is better)        1273.0
  Null Model Likelihood Ratio Test
    DF    Chi-Square      Pr > ChiSq
     1        115.13          <.0001
                   Solution for Fixed Effects

                         Standard
Effect       Estimate       Error      DF    t Value    Pr > |t|
Intercept      164.34      5.9797      33      27.48      <.0001
TIME          27.1979      1.8689     103      14.55      <.0001
CCOG         -0.03324      0.4856      33      -0.07      0.9458
TIME*CCOG      0.4197      0.1518     103       2.77      0.0067
Table 7.3: Conventional multilevel model for change: Opposite naming data
Comparing alternative error structures at level-1, with none at level-2 (REML)
ar(1)heterogeneous
The Mixed Procedure

             Estimated R Matrix for ID 1

 Row        Col1        Col2        Col3        Col4
   1     1340.67     1000.67      857.30      708.87
   2     1000.67     1111.10      951.90      787.10
   3      857.30      951.90     1213.18     1003.14
   4      708.87      787.10     1003.14     1233.93
                 Covariance Parameter Estimates

Cov                               Standard         Z
Parm       Subject    Estimate       Error     Value        Pr Z
Var(1)     ID          1340.67      316.29      4.24      <.0001
Var(2)     ID          1111.10      265.70      4.18      <.0001
Var(3)     ID          1213.18      290.11      4.18      <.0001
Var(4)     ID          1233.93      293.63      4.20      <.0001
ARH(1)     ID           0.8199     0.04105     19.97      <.0001
           Fit Statistics
-2 Res Log Likelihood          1264.8
AIC (smaller is better)        1274.8
AICC (smaller is better)       1275.3
BIC (smaller is better)        1282.6
  Null Model Likelihood Ratio Test
    DF    Chi-Square      Pr > ChiSq
     4        116.17          <.0001
                   Solution for Fixed Effects

                         Standard
Effect       Estimate       Error      DF    t Value    Pr > |t|
Intercept      164.64      6.0588      33      27.17      <.0001
TIME          27.1638      1.9131     103      14.20      <.0001
CCOG          -0.1111      0.4920      33      -0.23      0.8228
TIME*CCOG      0.4281      0.1554     103       2.76      0.0069
Table 7.3: Conventional multilevel model for change: Opposite naming data
Comparing alternative error structures at level-1, with none at level-2 (REML)
Toeplitz
The Mixed Procedure

             Estimated R Matrix for ID 1

 Row        Col1        Col2        Col3        Col4
   1     1246.90     1029.33      896.59      624.06
   2     1029.33     1246.90     1029.33      896.59
   3      896.59     1029.33     1246.90     1029.33
   4      624.06      896.59     1029.33     1246.90
                  Covariance Parameter Estimates

                                    Standard         Z
Cov Parm     Subject    Estimate       Error     Value        Pr Z
TOEP(2)      ID          1029.33      239.57      4.30      <.0001
TOEP(3)      ID           896.59      232.76      3.85      0.0001
TOEP(4)      ID           624.06      234.89      2.66      0.0079
Residual                 1246.90      242.67      5.14      <.0001
           Fit Statistics
-2 Res Log Likelihood          1258.1
AIC (smaller is better)        1266.1
AICC (smaller is better)       1266.4
BIC (smaller is better)        1272.3
  Null Model Likelihood Ratio Test
    DF    Chi-Square      Pr > ChiSq
     3        122.93          <.0001

                   Solution for Fixed Effects

                         Standard
Effect       Estimate       Error      DF    t Value    Pr > |t|
Intercept      165.10      5.9225      33      27.88      <.0001
TIME          26.8954      1.9429     103      13.84      <.0001
CCOG         -0.00070      0.4810      33      -0.00      0.9988
TIME*CCOG      0.4364      0.1578     103       2.77      0.0067

Table 7.4 on page 265.

title1 'Table 7.4: Comparing fixed effects in models with alternative error structures';
proc mixed data='c:\alda\opposites_pp' noclprint noinfo covtest noitprint method=reml;
  title2 'Standard error covariance structure';
  class id ;
  model opp=time ccog time*ccog / solution ddfm=bw notest;
  random intercept time / subject=id type=un;
run;
 
proc mixed data='c:\alda\opposites_pp' noclprint noinfo covtest noitprint method=reml;
  title3 'Toeplitz error covariance matrix';
  class id wave;
  model opp=time ccog time*ccog / solution ddfm=bw notest;
  repeated wave / subject=id type=toep r;
run;
 
proc mixed data='c:\alda\opposites_pp' noclprint noinfo covtest noitprint method=reml;
  title2 'Unstructured error covariance matrix';
  class id wave;
  model opp=time ccog time*ccog / solution ddfm=bw notest;
  repeated wave / subject=id type=un r;
run;

Table 7.4: Comparing fixed effects in models with alternative error structures
Standard error covariance structure
The Mixed Procedure

                  Covariance Parameter Estimates

                                    Standard         Z
Cov Parm     Subject    Estimate       Error     Value        Pr Z
UN(1,1)      ID          1236.41      332.40      3.72      <.0001
UN(2,1)      ID          -178.23     85.4298     -2.09      0.0370
UN(2,2)      ID           107.25     34.6767      3.09      0.0010
Residual                  159.48     26.9566      5.92      <.0001
           Fit Statistics
-2 Res Log Likelihood          1260.3
AIC (smaller is better)        1268.3
AICC (smaller is better)       1268.6
BIC (smaller is better)        1274.5
  Null Model Likelihood Ratio Test
    DF    Chi-Square      Pr > ChiSq
     3        120.72          <.0001
                   Solution for Fixed Effects

                         Standard
Effect       Estimate       Error      DF    t Value    Pr > |t|
Intercept      164.37      6.2061      33      26.49      <.0001
TIME          26.9600      1.9939     103      13.52      <.0001
CCOG          -0.1136      0.5040      33      -0.23      0.8231
TIME*CCOG      0.4329      0.1619     103       2.67      0.0087
Table 7.4: Comparing fixed effects in models with alternative error structures
Standard error covariance structure
Toeplitz error covariance matrix
The Mixed Procedure

             Estimated R Matrix for ID 1

 Row        Col1        Col2        Col3        Col4
   1     1246.90     1029.33      896.59      624.06
   2     1029.33     1246.90     1029.33      896.59
   3      896.59     1029.33     1246.90     1029.33
   4      624.06      896.59     1029.33     1246.90
                  Covariance Parameter Estimates

                                    Standard         Z
Cov Parm     Subject    Estimate       Error     Value        Pr Z
TOEP(2)      ID          1029.33      239.57      4.30      <.0001
TOEP(3)      ID           896.59      232.76      3.85      0.0001
TOEP(4)      ID           624.06      234.89      2.66      0.0079
Residual                 1246.90      242.67      5.14      <.0001
           Fit Statistics
-2 Res Log Likelihood          1258.1
AIC (smaller is better)        1266.1
AICC (smaller is better)       1266.4
BIC (smaller is better)        1272.3
  Null Model Likelihood Ratio Test
    DF    Chi-Square      Pr > ChiSq
     3        122.93          <.0001
                   Solution for Fixed Effects

                         Standard
Effect       Estimate       Error      DF    t Value    Pr > |t|
Intercept      165.10      5.9225      33      27.88      <.0001
TIME          26.8954      1.9429     103      13.84      <.0001
CCOG         -0.00070      0.4810      33      -0.00      0.9988
TIME*CCOG      0.4364      0.1578     103       2.77      0.0067
Table 7.4: Comparing fixed effects in models with alternative error structures
Unstructured error covariance matrix
The Mixed Procedure

             Estimated R Matrix for ID 1

 Row        Col1        Col2        Col3        Col4
   1     1344.84     1005.57      946.05      583.12
   2     1005.57     1150.30     1028.43      846.49
   3      946.05     1028.43     1235.65      969.24
   4      583.12      846.49      969.24     1205.89
                 Covariance Parameter Estimates

                                   Standard         Z
Cov Parm    Subject    Estimate       Error     Value        Pr Z
UN(1,1)     ID          1344.84      330.16      4.07      <.0001
UN(2,1)     ID          1005.57      277.88      3.62      0.0003
UN(2,2)     ID          1150.30      282.13      4.08      <.0001
UN(3,1)     ID           946.05      276.91      3.42      0.0006
UN(3,2)     ID          1028.43      272.75      3.77      0.0002
UN(3,3)     ID          1235.65      301.84      4.09      <.0001
UN(4,1)     ID           583.12      243.58      2.39      0.0167
UN(4,2)     ID           846.49      252.08      3.36      0.0008
UN(4,3)     ID           969.24      270.78      3.58      0.0003
UN(4,4)     ID          1205.89      296.70      4.06      <.0001
           Fit Statistics
-2 Res Log Likelihood          1255.8
AIC (smaller is better)        1275.8
AICC (smaller is better)       1277.5
BIC (smaller is better)        1291.3
  Null Model Likelihood Ratio Test
    DF    Chi-Square      Pr > ChiSq
     9        125.22          <.0001
                   Solution for Fixed Effects

                         Standard
Effect       Estimate       Error      DF    t Value    Pr > |t|
Intercept      165.83      5.9523      33      27.86      <.0001
TIME          26.5843      1.9257      33      13.80      <.0001
CCOG         -0.07408      0.4834      33      -0.15      0.8791
TIME*CCOG      0.4583      0.1564      33       2.93      0.0061

How to cite this page

Report an error on this page

UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services


The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California