Jason T. Newsom, Richard N. Jones, & Scott M. Hofer.

Longitudinal data analysis: A practical guide for researchers in aging, health, and social sciences

 

CHAPTER 7

 

Shaw BA & Liang J

 

 

Table 7.1 Multilevel Regression of BMI over Time &

Table 7.2 Multilevel Regression of BMI over Time, baseline age, and gender

 

Model 1

 

Bmi = body mass index

Ctime = time centered

 

 

PROC MIXED data=chpt7  COVTEST ;

CLASS id;

MODEL bmi = ctime /SOLUTION NOTEST DDFM=KR;

RANDOM INTERCEPT ctime /TYPE=UN SUBJECT=id GCORR;

RUN;

 

                                                         The SAS System                         09:44 Monday, April 11, 2011 471

 

                                                      The Mixed Procedure

 

                                                       Model Information

 

                                     Data Set                     WORK.CHPT7

                                     Dependent Variable           bmi

                                     Covariance Structure         Unstructured

                                     Subject Effect               id

                                     Estimation Method            REML

                                     Residual Variance Method     Profile

                                     Fixed Effects SE Method      Kenward-Roger

                                     Degrees of Freedom Method    Kenward-Roger

 

 

                                                    Class Level Information

 

                                       Class    Levels    Values

 

                                       id         7377    not printed

 

 

                                                          Dimensions

 

                                              Covariance Parameters             4

                                              Columns in X                      2

                                              Columns in Z Per Subject          2

                                              Subjects                       7377

                                              Max Obs Per Subject               6

 

 

                                                    Number of Observations

 

                                          Number of Observations Read           44262

                                          Number of Observations Used           42721

                                          Number of Observations Not Used        1541

 

 

                                                       Iteration History

 

                                  Iteration    Evaluations    -2 Res Log Like       Criterion

 

                                          0              1    264692.46803175

                                          1              2    193433.41107227      0.00000663

                                          2              1    193433.02543010      0.00000000

 

 

                                                   Convergence criteria met.

 

 

                                                 Estimated G Correlation Matrix

 

                                        Row    Effect       id          Col1        Col2

 

                                          1    Intercept       1      1.0000      0.2084

                                          2    ctime           1      0.2084      1.0000

                                                         The SAS System                         09:44 Monday, April 11, 2011 472

 

                                                      The Mixed Procedure

 

                                                 Covariance Parameter Estimates

 

                                                                   Standard         Z

                               Cov Parm     Subject    Estimate       Error     Value        Pr Z

 

                               UN(1,1)      id          26.0290      0.4352     59.81      <.0001

                               UN(2,1)      id           0.2662     0.01880     14.16      <.0001

                               UN(2,2)      id          0.06267    0.001593     39.34      <.0001

                               Residual                  2.1710     0.01836    118.23      <.0001

 

 

                                                        Fit Statistics

 

                                             -2 Res Log Likelihood        193433.0

                                             AIC (smaller is better)      193441.0

                                             AICC (smaller is better)     193441.0

                                             BIC (smaller is better)      193468.6

 

 

                                                Null Model Likelihood Ratio Test

 

                                                  DF    Chi-Square      Pr > ChiSq

 

                                                   3      71259.44          <.0001

 

 

                                                   Solution for Fixed Effects

 

                                                         Standard

                                Effect       Estimate       Error      DF    t Value    Pr > |t|

 

                                Intercept     28.0979     0.05985    7375     469.47      <.0001

                                ctime         0.05382    0.003594    7254      14.97      <.0001

                                                       

 

 

Table 7.2 Multilevel Regression of BMI over Time, baseline age, and gender

 

Model 2

 

 

PROC MIXED data=chpt7  COVTEST ;

CLASS id;

MODEL bmi = ctime Zage  zage*ctime  /SOLUTION NOTEST DDFM=KR;

RANDOM INTERCEPT ctime   /TYPE=UN SUBJECT=id GCORR;

RUN;

 

 

 

 The SAS System                         09:44 Monday, April 11, 2011 473

 

                                                      The Mixed Procedure

 

                                                       Model Information

 

                                     Data Set                     WORK.CHPT7

                                     Dependent Variable           bmi

                                     Covariance Structure         Unstructured

                                     Subject Effect               id

                                     Estimation Method            REML

                                     Residual Variance Method     Profile

                                     Fixed Effects SE Method      Kenward-Roger

                                     Degrees of Freedom Method    Kenward-Roger

 

 

                                                    Class Level Information

 

                                       Class    Levels    Values

 

                                       id         7377    not printed

 

 

                                                          Dimensions

 

                                              Covariance Parameters             4

                                              Columns in X                      4

                                              Columns in Z Per Subject          2

                                              Subjects                       7377

                                              Max Obs Per Subject               6

 

 

                                                    Number of Observations

 

                                          Number of Observations Read           44262

                                          Number of Observations Used           42721

                                          Number of Observations Not Used        1541

 

 

                                                       Iteration History

 

                                  Iteration    Evaluations    -2 Res Log Like       Criterion

 

                                          0              1    264554.78052201

                                          1              2    193292.38565887      0.00000530

                                          2              1    193292.07813591      0.00000000

 

 

                                                   Convergence criteria met.

 

 

                                                 Estimated G Correlation Matrix

 

                                        Row    Effect       id          Col1        Col2

 

                                          1    Intercept       1      1.0000      0.2019

                                          2    ctime           1      0.2019      1.0000

                                                         The SAS System                         09:44 Monday, April 11, 2011 474

 

                                                      The Mixed Procedure

 

                                                 Covariance Parameter Estimates

 

                                                                   Standard         Z

                               Cov Parm     Subject    Estimate       Error     Value        Pr Z

 

                               UN(1,1)      id          25.9435      0.4338     59.81      <.0001

                               UN(2,1)      id           0.2536     0.01857     13.66      <.0001

                               UN(2,2)      id          0.06082    0.001563     38.92      <.0001

                               Residual                  2.1711     0.01836    118.23      <.0001

 

 

                                                        Fit Statistics

 

                                             -2 Res Log Likelihood        193292.1

                                             AIC (smaller is better)      193300.1

                                             AICC (smaller is better)     193300.1

                                             BIC (smaller is better)      193327.7

 

 

                                                Null Model Likelihood Ratio Test

 

                                                  DF    Chi-Square      Pr > ChiSq

 

                                                   3      71262.70          <.0001

 

 

                                                  Solution for Fixed Effects

 

                                                         Standard

                               Effect        Estimate       Error      DF    t Value    Pr > |t|

 

                               Intercept      28.0981     0.05975    7373     470.23      <.0001

                               ctime          0.05395    0.003559    7252      15.16      <.0001

                               Zage           -0.2985     0.05977    7377      -4.99      <.0001

                               ctime*Zage    -0.04315    0.003565    7270     -12.10      <.0001

 

 

Table 7.2 Multilevel Regression of BMI over Time, baseline age, and gender

 

Model 3

 

 

PROC MIXED data=chpt7  COVTEST ;

CLASS id;

MODEL bmi = ctime Zage Zgender zage*ctime zgender*ctime /SOLUTION NOTEST DDFM=KR;

RANDOM INTERCEPT ctime   /TYPE=UN SUBJECT=id GCORR;

RUN;

 

                                                         The SAS System                         09:44 Monday, April 11, 2011 475

 

                                                      The Mixed Procedure

 

                                                       Model Information

 

                                     Data Set                     WORK.CHPT7

                                     Dependent Variable           bmi

                                     Covariance Structure         Unstructured

                                     Subject Effect               id

                                     Estimation Method            REML

                                     Residual Variance Method     Profile

                                     Fixed Effects SE Method      Kenward-Roger

                                     Degrees of Freedom Method    Kenward-Roger

 

 

                                                    Class Level Information

 

                                       Class    Levels    Values

 

                                       id         7377    not printed

 

 

                                                          Dimensions

 

                                              Covariance Parameters             4

                                              Columns in X                      6

                                              Columns in Z Per Subject          2

                                              Subjects                       7377

                                              Max Obs Per Subject               6

 

 

                                                    Number of Observations

 

                                          Number of Observations Read           44262

                                          Number of Observations Used           42721

                                          Number of Observations Not Used        1541

 

 

                                                       Iteration History

 

                                  Iteration    Evaluations    -2 Res Log Like       Criterion

 

                                          0              1    264565.95297507

                                          1              2    193301.13661251      0.00000513

                                          2              1    193300.83898603      0.00000000

 

 

                                                   Convergence criteria met.

 

 

                                                 Estimated G Correlation Matrix

 

                                        Row    Effect       id          Col1        Col2

 

                                          1    Intercept       1      1.0000      0.2018

                                          2    ctime           1      0.2018      1.0000

                                                         The SAS System                         09:44 Monday, April 11, 2011 476

 

                                                      The Mixed Procedure

 

                                                 Covariance Parameter Estimates

 

                                                                   Standard         Z

                               Cov Parm     Subject    Estimate       Error     Value        Pr Z

 

                               UN(1,1)      id          25.9434      0.4338     59.80      <.0001

                               UN(2,1)      id           0.2534     0.01856     13.65      <.0001

                               UN(2,2)      id          0.06078    0.001562     38.90      <.0001

                               Residual                  2.1711     0.01836    118.23      <.0001

 

 

                                                        Fit Statistics

 

                                             -2 Res Log Likelihood        193300.8

                                             AIC (smaller is better)      193308.8

                                             AICC (smaller is better)     193308.8

                                             BIC (smaller is better)      193336.5

 

 

                                                Null Model Likelihood Ratio Test

 

                                                  DF    Chi-Square      Pr > ChiSq

 

                                                   3      71265.11          <.0001

 

 

                                                   Solution for Fixed Effects

 

                                                           Standard

                              Effect           Estimate       Error      DF    t Value    Pr > |t|

 

                              Intercept         28.0980     0.05975    7372     470.23      <.0001

                              ctime             0.05397    0.003558    7251      15.17      <.0001

                              Zage              -0.2847     0.06140    7376      -4.64      <.0001

                              Zgender          -0.06057     0.06138    7371      -0.99      0.3238

                              ctime*Zage       -0.04149    0.003661    7264     -11.33      <.0001

                              ctime*Zgender    -0.00725    0.003652    7238      -1.99      0.0471

 

 

 

Table 7.2 Multilevel Regression of BMI over Time, baseline age, and gender

 

Model 4

 

 

PROC MIXED data=chpt7  COVTEST ;

CLASS id;

MODEL bmi = ctime Zage Zgender zage*ctime zgender*ctime genderage /SOLUTION NOTEST DDFM=KR;

RANDOM INTERCEPT ctime   /TYPE=UN SUBJECT=id GCORR;

RUN;

 

                                                         The SAS System                         09:44 Monday, April 11, 2011 477

 

                                                      The Mixed Procedure

 

                                                       Model Information

 

                                     Data Set                     WORK.CHPT7

                                     Dependent Variable           bmi

                                     Covariance Structure         Unstructured

                                     Subject Effect               id

                                     Estimation Method            REML

                                     Residual Variance Method     Profile

                                     Fixed Effects SE Method      Kenward-Roger

                                     Degrees of Freedom Method    Kenward-Roger

 

 

                                                    Class Level Information

 

                                       Class    Levels    Values

 

                                       id         7377    not printed

 

 

                                                          Dimensions

 

                                              Covariance Parameters             4

                                              Columns in X                      7

                                              Columns in Z Per Subject          2

                                              Subjects                       7377

                                              Max Obs Per Subject               6

 

 

                                                    Number of Observations

 

                                          Number of Observations Read           44262

                                          Number of Observations Used           42721

                                          Number of Observations Not Used        1541

 

 

                                                       Iteration History

 

                                  Iteration    Evaluations    -2 Res Log Like       Criterion

 

                                          0              1    264565.90064867

                                          1              2    193302.97579931      0.00000524

                                          2              1    193302.67136322      0.00000000

 

 

                                                   Convergence criteria met.

 

 

                                                 Estimated G Correlation Matrix

 

                                        Row    Effect       id          Col1        Col2

 

                                          1    Intercept       1      1.0000      0.2024

                                          2    ctime           1      0.2024      1.0000

                                                         The SAS System                         09:44 Monday, April 11, 2011 478

 

                                                      The Mixed Procedure

 

                                                 Covariance Parameter Estimates

 

                                                                   Standard         Z

                               Cov Parm     Subject    Estimate       Error     Value        Pr Z

 

                               UN(1,1)      id          25.9444      0.4339     59.80      <.0001

                               UN(2,1)      id           0.2542     0.01857     13.69      <.0001

                               UN(2,2)      id          0.06078    0.001562     38.90      <.0001

                               Residual                  2.1711     0.01836    118.23      <.0001

 

 

                                                        Fit Statistics

 

                                             -2 Res Log Likelihood        193302.7

                                             AIC (smaller is better)      193310.7

                                             AICC (smaller is better)     193310.7

                                             BIC (smaller is better)      193338.3

 

 

                                                Null Model Likelihood Ratio Test

 

                                                  DF    Chi-Square      Pr > ChiSq

 

                                                   3      71263.23          <.0001

 

 

                                                   Solution for Fixed Effects

 

                                                           Standard

                              Effect           Estimate       Error      DF    t Value    Pr > |t|

 

                              Intercept         28.1173     0.06132    7389     458.53      <.0001

                              ctime             0.05397    0.003558    7251      15.17      <.0001

                              Zage              -0.2763     0.06169    7379      -4.48      <.0001

                              Zgender          -0.05808     0.06141    7370      -0.95      0.3443

                              ctime*Zage       -0.04150    0.003661    7264     -11.34      <.0001

                              ctime*Zgender    -0.00725    0.003652    7238      -1.99      0.0471

                              genderage        -0.08409     0.06019    7366      -1.40      0.1624

 

 

 

 

 

Table 7.3 Multilevel Regression of BMI over Time and time-varying marital status

 

Model 5

 

 

GENDER*AGE INTERACTION EFFECT DIFFERS FROM THE HLM ANALYSIS, MOST LIKELY DUE TO DIFFERENT CASES INCLUDED IN THE ANALYSIS DUE TO MISSING VALUES.

DF IN HLM ANALYSIS IS 7373, BUT ONLY 7180 FOR TH IS COEFFICIENT IN SAS.  ALL OTHER COEFFICIENTS ARE NEARLY IDENTICAL.;

PROC MIXED data=chpt7  COVTEST ;

CLASS id;

MODEL bmi = ctime Zage Zgender zage*ctime zgender*ctime genderage married

         /SOLUTION NOTEST DDFM=KR;

RANDOM INTERCEPT ctime married  /TYPE=UN SUBJECT=id GCORR;

RUN;

 

 

                                                         The SAS System                         09:44 Monday, April 11, 2011 479

 

                                                      The Mixed Procedure

 

                                                       Model Information

 

                                     Data Set                     WORK.CHPT7

                                     Dependent Variable           bmi

                                     Covariance Structure         Unstructured

                                     Subject Effect               id

                                     Estimation Method            REML

                                     Residual Variance Method     Profile

                                     Fixed Effects SE Method      Kenward-Roger

                                     Degrees of Freedom Method    Kenward-Roger

 

 

                                                    Class Level Information

 

                                       Class    Levels    Values

 

                                       id         7377    not printed

 

 

                                                          Dimensions

 

                                              Covariance Parameters             7

                                              Columns in X                      8

                                              Columns in Z Per Subject          3

                                              Subjects                       7377

                                              Max Obs Per Subject               6

 

 

                                                    Number of Observations

 

                                          Number of Observations Read           44262

                                          Number of Observations Used           42713

                                          Number of Observations Not Used        1549

 

 

                                                       Iteration History

 

                                  Iteration    Evaluations    -2 Res Log Like       Criterion

 

                                          0              1    264495.87052990

                                          1              3    193824.65240761      0.01386982

                                          2              1    193364.91414239      0.00307672

                                          3              1    193150.38640398      0.00067145

                                          4              1    193105.42808783      0.00007634

                                          5              1    193100.66868827      0.00000172

                                          6              1    193100.56852481      0.00000000

 

 

                                                   Convergence criteria met.

 

 

                                                         The SAS System                         09:44 Monday, April 11, 2011 480

 

                                                      The Mixed Procedure

 

                                                 Estimated G Correlation Matrix

 

                                  Row    Effect       id          Col1        Col2        Col3

 

                                    1    Intercept       1      1.0000      0.1757     -0.2153

                                    2    ctime           1      0.1757      1.0000      0.1451

                                    3    married         1     -0.2153      0.1451      1.0000

 

 

                                                 Covariance Parameter Estimates

 

                                                                   Standard         Z

                               Cov Parm     Subject    Estimate       Error     Value        Pr Z

 

                               UN(1,1)      id          26.8595      0.5994     44.81      <.0001

                               UN(2,1)      id           0.2218     0.02318      9.57      <.0001

                               UN(2,2)      id          0.05934    0.001582     37.50      <.0001

                               UN(3,1)      id          -1.5850      0.3239     -4.89      <.0001

                               UN(3,2)      id          0.05023     0.02015      2.49      0.0127

                               UN(3,3)      id           2.0182      0.2426      8.32      <.0001

                               Residual                  2.1325     0.01832    116.43      <.0001

 

 

                                                        Fit Statistics

 

                                             -2 Res Log Likelihood        193100.6

                                             AIC (smaller is better)      193114.6

                                             AICC (smaller is better)     193114.6

                                             BIC (smaller is better)      193162.9

 

 

                                                Null Model Likelihood Ratio Test

 

                                                  DF    Chi-Square      Pr > ChiSq

 

                                                   6      71395.30          <.0001

 

 

                                                   Solution for Fixed Effects

 

                                                           Standard

                              Effect           Estimate       Error      DF    t Value    Pr > |t|

 

                              Intercept         27.8818     0.07711    4052     361.58      <.0001

                              ctime             0.05808    0.003583    7054      16.21      <.0001

                              Zage              -0.2628     0.06165    7262      -4.26      <.0001

                              Zgender          -0.08256     0.06165    7380      -1.34      0.1805

                              ctime*Zage       -0.04092    0.003652    7247     -11.21      <.0001

                              ctime*Zgender    -0.00916    0.003646    7211      -2.51      0.0120

                              genderage         -0.1028     0.06005    7180      -1.71      0.0871

                              married            0.3108     0.06150    1405       5.05      <.0001

 

 

 

 

Table 7.3 Multilevel Regression of BMI over Time and time-varying marital status

 

Model 5

 

 

GENDER*AGE AND GENDER*AGE*MARRIED INTERACTION EFFECTS DIFFER FROM THE HLM ANALYSIS, MOST LIKELY DUE TO DIFFERENT CASES INCLUDED IN THE ANALYSIS DUE TO MISSING VALUES.

DF IN HLM ANALYSIS IS 7373, BUT ONLY 7180 FOR TH IS COEFFICIENT IN SAS.  ALL OTHER COEFFICIENTS ARE NEARLY IDENTICAL.

;

PROC MIXED data=chpt7  COVTEST ;

CLASS id;

MODEL bmi = ctime Zage Zgender zage*ctime zgender*ctime genderage married

       zage*married zgender*married genderage*married   /SOLUTION NOTEST DDFM=KR;

RANDOM INTERCEPT ctime married  /TYPE=UN SUBJECT=id GCORR;

RUN;

 

                                                         The SAS System                         09:44 Monday, April 11, 2011 481

 

                                                      The Mixed Procedure

 

                                                       Model Information

 

                                     Data Set                     WORK.CHPT7

                                     Dependent Variable           bmi

                                     Covariance Structure         Unstructured

                                     Subject Effect               id

                                     Estimation Method            REML

                                     Residual Variance Method     Profile

                                     Fixed Effects SE Method      Kenward-Roger

                                     Degrees of Freedom Method    Kenward-Roger

 

 

                                                    Class Level Information

 

                                       Class    Levels    Values

 

                                       id         7377    not printed

 

 

                                                          Dimensions

 

                                              Covariance Parameters             7

                                              Columns in X                     11

                                              Columns in Z Per Subject          3

                                              Subjects                       7377

                                              Max Obs Per Subject               6

 

 

                                                    Number of Observations

 

                                          Number of Observations Read           44262

                                          Number of Observations Used           42713

                                          Number of Observations Not Used        1549

 

 

                                                       Iteration History

 

                                  Iteration    Evaluations    -2 Res Log Like       Criterion

 

                                          0              1    264331.43193472

                                          1              3    197200.05753046    9099.0175428

                                          2              2    194653.83100140      0.62068328

                                          3              1    193490.79454445      0.00517776

                                          4              2    193197.85722744      0.00121649

                                          5              1    193116.48017523      0.00014172

                                          6              1    193107.54211058      0.00000458

                                          7              1    193107.27287702      0.00000001

 

 

                                                   Convergence criteria met.

 

 

                                                         The SAS System                         09:44 Monday, April 11, 2011 482

 

                                                      The Mixed Procedure

 

                                                 Estimated G Correlation Matrix

 

                                  Row    Effect       id          Col1        Col2        Col3

 

                                    1    Intercept       1      1.0000      0.1755     -0.2152

                                    2    ctime           1      0.1755      1.0000      0.1450

                                    3    married         1     -0.2152      0.1450      1.0000

 

 

                                                 Covariance Parameter Estimates

 

                                                                   Standard         Z

                               Cov Parm     Subject    Estimate       Error     Value        Pr Z

 

                               UN(1,1)      id          26.8253      0.5993     44.76      <.0001

                               UN(2,1)      id           0.2214     0.02318      9.55      <.0001

                               UN(2,2)      id          0.05935    0.001583     37.50      <.0001

                               UN(3,1)      id          -1.5925      0.3242     -4.91      <.0001

                               UN(3,2)      id          0.05047     0.02017      2.50      0.0123

                               UN(3,3)      id           2.0412      0.2441      8.36      <.0001

                               Residual                  2.1326     0.01832    116.43      <.0001

 

 

                                                        Fit Statistics

 

                                             -2 Res Log Likelihood        193107.3

                                             AIC (smaller is better)      193121.3

                                             AICC (smaller is better)     193121.3

                                             BIC (smaller is better)      193169.6

 

 

                                                Null Model Likelihood Ratio Test

 

                                                  DF    Chi-Square      Pr > ChiSq

 

                                                   6      71224.16          <.0001

 

 

                                                   Solution for Fixed Effects

 

                                                             Standard

                            Effect               Estimate       Error      DF    t Value    Pr > |t|

 

                            Intercept             27.8393     0.07993    3646     348.30      <.0001

                            ctime                 0.05785    0.003585    7066      16.13      <.0001

                            Zage                  -0.2203     0.08089    3544      -2.72      0.0065

                            Zgender               -0.1811     0.08187    3489      -2.21      0.0270

                            ctime*Zage           -0.04123    0.003706    7141     -11.13      <.0001

                            ctime*Zgender        -0.00849    0.003675    7033      -2.31      0.0209

                            genderage            -0.03267     0.08147    3410      -0.40      0.6884

                            married                0.3522     0.06487    1334       5.43      <.0001

                            Zage*married         -0.05008     0.06322    1258      -0.79      0.4284

                            Zgender*married        0.1205     0.06690    1305       1.80      0.0720

                            genderage*married    -0.07574     0.06322    1177      -1.20      0.2311