/* Doubly Multivariate Design - Two Variables, Repeated Measures PROC GLM can analyse the design directly by using the M= option on the MANOVA statement, using the dependent variable contrasts (the 'M' matrix from the GLH: ThetaHat = LBM = 0). Following is an example in which we have three groups: TreatA, TreatB, and Control, and 2 variables: Y1, Y2 measured each on 3 occasions (Pre, Post, Follow-up) (Y1: PreY1, PostY1, FolY1; Y2: PreY2, PostY2, and FolY2). The GLM analyses of this using the MANOVA statement follows. Note that I actually have two MANOVA statements for each test, one using the syntax m=(contrasts), and the other using the syntax m=var1+/-var2. Both will work in Version 6; I have commented out the simpler versions that directly use the M matrix. I prefer those as that is the way I think when I set up the contrasts and dislike having to translate them into equations. This dataset is copyright (c) 1988, Robert M. Hamer. */ data exam9; * This example is copyright (c) 1988, Robert M. Hamer, and may be used as a teaching example in university classes without permission, but all other rights are reserved; input trt $ reps PreY1 PostY1 FolY1 PreY2 PostY2 FolY2; label trt ='Treatment' reps ='Subject' PreY1='Pretest Y1' PostY1='Posttest Y1' FolY1='Follow up Y1' PreY2='Pretest Y2' PostY2='Posttest Y2' FolY2='Follow up Y2'; datalines; TreatA 1 3 13 9 0 0 9 TreatA 2 0 14 10 6 6 3 TreatA 3 4 6 17 8 2 6 TreatA 4 7 7 13 7 6 4 TreatA 5 3 12 11 6 12 6 TreatA 6 10 14 8 13 3 8 TreatB 1 9 11 17 8 11 27 TreatB 2 4 16 13 9 3 26 TreatB 3 8 10 9 12 0 18 TreatB 4 5 9 13 3 0 14 TreatB 5 0 15 11 3 0 25 TreatB 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 print noobs; title 'Data for Doubly Multivariate design'; run; proc means data=exam9 mean std noprint; class trt; var prey1 posty1 foly1 prey2 posty2 foly2; output out=means mean=prey1 posty1 foly1 prey2 posty2 foly2; proc print noobs; proc glm data=exam9; class trt; model PreY1 PostY1 FolY1 PreY2 PostY2 FolY2 = trt / NOUNI; *-- The Treatment effect and the Treatment x Time interaction can be decomposed into two contrasts of interest by the following contrasts. They are not tested here; * contrast 'Treat A vs B' trt 0 1 -1; * contrast 'Trt vs Control' trt -2 1 1; repeated measure 2 identity, time 3 profile / printM; title2 'MANOVA using Repeated Statement -- Short Way'; run; proc glm data=exam9; class trt; model PreY1 PostY1 FolY1 PreY2 PostY2 FolY2 = trt / NOUNI; *-- Treatment effect--(sum over occasions); * manova h=trt M=(1 1 1 0 0 0, 0 0 0 1 1 1) mnames=Y1 Y2; manova h=trt M=PreY1+PostY1+FolY1, PreY2+PostY2+FolY2 mnames=Y1 Y2 / short ; *-- Time effect--(sum over treatments by testing INTERCEPT); * manova h=intercept M=(1 -1 0 0 0 0, 1 0 -1 0 0 0, 0 0 0 1 -1 0, 0 0 0 1 0 -1); manova h=intercept M= PreY1-PostY1, PreY1-FolY1, PreY2-PostY2, PreY2-FolY2 MNAMES=PrePost1 PreFol1 PrePost2 PreFol2 / short ; *-- time x treatment interaction--; * manova h=trt M=(1 -1 0 0 0 0, 1 0 -1 0 0 0, 0 0 0 1 -1 0, 0 0 0 1 0 -1); manova h=trt M= PreY1-PostY1, PreY1-FolY1, PreY2-PostY2, PreY2-FolY2 MNAMES=PrePost1 PreFol1 PrePost2 PreFol2 / short ; title 'Multivariate Repeated Measures with two dependents -- Long Way'; run; *-- Stepdown analysis: Treat pre scores as covariates; proc glm data=exam9; class trt; Y11: model posty1 = prey1 trt ; title 'Stepdown analysis'; proc glm data=exam9; class trt; Y12: model foly1 = posty1 prey1 trt ; proc glm data=exam9; class trt; Y21: model posty2 = prey2 trt ; proc glm data=exam9; class trt; Y22: model foly2 = posty2 prey2 trt ;