The GLM Procedure

Example 47.9 Analyzing a Doubly Multivariate Repeated Measures Design

(View the complete code for this example.)

This example shows how to analyze a doubly multivariate repeated measures design by using PROC GLM with an IDENTITY factor in the REPEATED statement. Note that this differs from previous releases of PROC GLM, in which you had to use a MANOVA statement to get a doubly repeated measures analysis.

Two responses, Y1 and Y2, are each measured three times for each subject (pretreatment, posttreatment, and in a later follow-up). Each subject receives one of three treatments; A, B, or the control. In PROC GLM, you use a REPEATED factor of type IDENTITY to identify the different responses and another repeated factor to identify the different measurement times. The repeated measures analysis includes multivariate tests for time and treatment main effects, as well as their interactions, across responses. The following statements produce Output 47.9.1 through Output 47.9.3.

options ls=96;
data Trial;
   input Treatment $ Repetition PreY1 PostY1 FollowY1
                                PreY2 PostY2 FollowY2;
   datalines;
A        1  3  13  9  0  0  9
A        2  0  14 10  6  6  3
A        3  4   6 17  8  2  6
A        4  7   7 13  7  6  4
A        5  3  12 11  6 12  6
A        6 10  14  8 13  3  8
B        1  9  11 17  8 11 27
B        2  4  16 13  9  3 26
B        3  8  10  9 12  0 18
B        4  5   9 13  3  0 14
B        5  0  15 11  3  0 25
B        6  4  11 14  4  2  9
Control  1 10  12 15  4  3  7
Control  2  2   8 12  8  7 20
Control  3  4   9 10  2  0 10
Control  4 10   8  8  5  8 14
Control  5 11  11 11  1  0 11
Control  6  1  5  15  8  9 10
;
proc glm data=Trial;
   class Treatment;
   model PreY1 PostY1 FollowY1
         PreY2 PostY2 FollowY2 = Treatment / nouni;
   repeated Response 2 identity, Time 3;
run;

Output 47.9.1: A Doubly Multivariate Repeated Measures Design

The GLM Procedure

Class Level Information
ClassLevelsValues
Treatment3A B Control

Number of Observations Read18
Number of Observations Used18


The levels of the repeated factors are displayed in Output 47.9.2. Note that RESPONSE is 1 for all the Y1 measurements and 2 for all the Y2 measurements, while the three levels of Time identify the pretreatment, posttreatment, and follow-up measurements within each response. The multivariate tests for within-subject effects are displayed in Output 47.9.3.

Output 47.9.2: Repeated Factor Levels

The GLM Procedure
Repeated Measures Analysis of Variance

Repeated Measures Level Information
Dependent VariablePreY1PostY1FollowY1PreY2PostY2FollowY2
Level of Response111222
Level of Time123123


Output 47.9.3: Within-Subject Tests

MANOVA Test Criteria and Exact F Statistics for the Hypothesis of no Response Effect
H = Type III SSCP Matrix for Response
E = Error SSCP Matrix

S=1 M=0 N=6
StatisticValueF ValueNum DFDen DFPr > F
Wilks' Lambda0.02165587316.24214<.0001
Pillai's Trace0.97834413316.24214<.0001
Hotelling-Lawley Trace45.17686368316.24214<.0001
Roy's Greatest Root45.17686368316.24214<.0001

MANOVA Test Criteria and F Approximations for the Hypothesis of no Response*Treatment Effect
H = Type III SSCP Matrix for Response*Treatment
E = Error SSCP Matrix

S=2 M=-0.5 N=6
StatisticValueF ValueNum DFDen DFPr > F
Wilks' Lambda0.722157971.244280.3178
Pillai's Trace0.279374441.224300.3240
Hotelling-Lawley Trace0.382616601.31415.8180.3074
Roy's Greatest Root0.376987802.832150.0908
NOTE: F Statistic for Roy's Greatest Root is an upper bound.
NOTE: F Statistic for Wilks' Lambda is exact.

MANOVA Test Criteria and Exact F Statistics for the Hypothesis of no Response*Time Effect
H = Type III SSCP Matrix for Response*Time
E = Error SSCP Matrix

S=1 M=1 N=5
StatisticValueF ValueNum DFDen DFPr > F
Wilks' Lambda0.1407138018.32412<.0001
Pillai's Trace0.8592862018.32412<.0001
Hotelling-Lawley Trace6.1066236218.32412<.0001
Roy's Greatest Root6.1066236218.32412<.0001

MANOVA Test Criteria and F Approximations for the Hypothesis of no Response*Time*Treatment Effect
H = Type III SSCP Matrix for Response*Time*Treatment
E = Error SSCP Matrix

S=2 M=0.5 N=5
StatisticValueF ValueNum DFDen DFPr > F
Wilks' Lambda0.228614513.278240.0115
Pillai's Trace0.965387853.038260.0151
Hotelling-Lawley Trace2.525575143.648150.0149
Roy's Greatest Root2.126519056.914130.0033
NOTE: F Statistic for Roy's Greatest Root is an upper bound.
NOTE: F Statistic for Wilks' Lambda is exact.


The table for Response*Treatment tests for an overall treatment effect across the two responses; likewise, the tables for Response*Time and Response*Treatment*Time test for time and the treatment-by-time interaction, respectively. In this case, there is a strong main effect for time and possibly for the interaction, but not for treatment.

In previous releases (before the IDENTITY transformation was introduced), in order to perform a doubly repeated measures analysis, you had to use a MANOVA statement with a customized transformation matrix M. You might still want to use this approach to see details of the analysis, such as the univariate ANOVA for each transformed variate. The following statements demonstrate this approach by using the MANOVA statement to test for the overall main effect of time and specifying the SUMMARY option.

proc glm data=Trial;
   class Treatment;
   model PreY1 PostY1 FollowY1
         PreY2 PostY2 FollowY2 = Treatment / nouni;
   manova  h=intercept  m=prey1 - posty1,
                          prey1 - followy1,
                          prey2 - posty2,
                          prey2 - followy2 / summary;
run;

The M matrix used to perform the test for time effects is displayed in Output 47.9.4, while the results of the multivariate test are given in Output 47.9.5. Note that the test results are the same as for the Response*Time effect in Output 47.9.3.

Output 47.9.4: M Matrix to Test for Time Effect (Repeated Measure)

The GLM Procedure
Multivariate Analysis of Variance

M Matrix Describing Transformed Variables
 PreY1PostY1FollowY1PreY2PostY2FollowY2
MVAR11-10000
MVAR210-1000
MVAR30001-10
MVAR400010-1


Output 47.9.5: Tests for Time Effect (Repeated Measure)

The GLM Procedure
Multivariate Analysis of Variance

Characteristic Roots and Vectors of: E Inverse * H, where
H = Type III SSCP Matrix for Intercept
E = Error SSCP Matrix

Variables have been transformed by the M Matrix
Characteristic RootPercentCharacteristic Vector V'EV=1
MVAR1MVAR2MVAR3MVAR4
6.10662362100.00-0.001577290.04081620-0.042102090.03519437
0.000000000.000.007963670.004932170.051852360.00377940
0.000000000.00-0.03534089-0.01502146-0.002830740.04259372
0.000000000.00-0.056721370.045002080.000000000.00000000

MANOVA Test Criteria and Exact F Statistics for the Hypothesis of No Overall Intercept Effect
on the Variables Defined by the M Matrix Transformation
H = Type III SSCP Matrix for Intercept
E = Error SSCP Matrix

S=1 M=1 N=5
StatisticValueF ValueNum DFDen DFPr > F
Wilks' Lambda0.1407138018.32412<.0001
Pillai's Trace0.8592862018.32412<.0001
Hotelling-Lawley Trace6.1066236218.32412<.0001
Roy's Greatest Root6.1066236218.32412<.0001


The SUMMARY option in the MANOVA statement creates an ANOVA table for each transformed variable as defined by the M matrix. MVAR1 and MVAR2 contrast the pretreatment measurement for Y1 with the posttreatment and follow-up measurements for Y1, respectively; MVAR3 and MVAR4 are the same contrasts for Y2. Output 47.9.6 displays these univariate ANOVA tables and shows that the contrasts are all strongly significant except for the pre-versus-post difference for Y2.

Output 47.9.6: Summary Output for the Test for Time Effect

The GLM Procedure
Multivariate Analysis of Variance
 
Dependent Variable: MVAR1

SourceDFType III SSMean SquareF ValuePr > F
Intercept1512.0000000512.000000022.650.0003
Error15339.000000022.6000000  

The GLM Procedure
Multivariate Analysis of Variance
 
Dependent Variable: MVAR2

SourceDFType III SSMean SquareF ValuePr > F
Intercept1813.3888889813.388888932.87<.0001
Error15371.166666724.7444444  

The GLM Procedure
Multivariate Analysis of Variance
 
Dependent Variable: MVAR3

SourceDFType III SSMean SquareF ValuePr > F
Intercept168.055555668.05555563.490.0814
Error15292.500000019.5000000  

The GLM Procedure
Multivariate Analysis of Variance
 
Dependent Variable: MVAR4

SourceDFType III SSMean SquareF ValuePr > F
Intercept1800.0000000800.000000026.430.0001
Error15454.000000030.2666667