* chapter_14_table_10 The hypothetical data contained in Table 14.10 contains an additional level of angle (four degrees) that was not considered in Table 14.8. The analysis of Table 14.10 is analogous to that of Table 14.8. The only differences is that angle4 needs to be included on the left hand side of the equals sign and the levels of angle should be changed from '2' to '3' on the REPEATED line. One way to test specific contrasts within PROC GLM for the repeated factors without explicitly forming D variables is to specify the H and M matrices. The H matrix is the hypothesis of the between subject effects while the M matrices are for the within subject effects. H is specified as Intercept because do collapse across the between subject factor ignoring any interactive effects that may exist. We define the particular D variable (here polynomials) in the M matrix. The results obtained match those given in the text on pages 714 (for the between- subject main effect), 719 (for the within-subject main effect), and 721 (for the interaction). The results of the linear and quadratic effects are given on page 728. ; LIBNAME md 'd:\data files by type\sas data files\tables'; Data c14t10; SET md.chapter_14_table_10; PROC GLM; CLASS group; MODEL angle0 angle4 angle8 = group / NOUNI; REPEATED angle 3; Title 'Test of the Linear Component'; MANOVA H=INTERCEPT M=(-1 0 1, -1 0 1); Title 'Test of the Quadratic Component'; MANOVA H=INTERCEPT M=(1 -2 1, 1 -2 1); RUN; *Between-Subject Effects at Fixed Levels of the Within Subjects Factor: Below in the following three PROC GLM statements we perform between subject effects at fixed values of the repeated factor (angle here). Performing such analyses allows us to see if young and old differ at specific levels of the within subjects factor; PROC GLM; CLASS group; MODEL angle0 = group; RUN; PROC GLM; CLASS group; MODEL angle4 = group; RUN; PROC GLM; CLASS group; MODEL angle8 = group; RUN; *Within-Subject Effects at Fixed Levels of Between-Subject Effects: In the following two PROC GLM statements we test the within subjects effects at fixed values of the between subjects factor. Note that this tests treats the error terms as separate and distinct.; PROC GLM; CLASS group; WHERE (group=1); MODEL angle0 angle4 angle8 = / NOUNI; REPEATED angle 3; RUN; PROC GLM; CLASS group; WHERE (group=2); MODEL angle0 angle4 angle8 = / NOUNI; REPEATED angle 3; RUN; *Cell Mean Comparisons: Here we test the linear and quadratic trends for the young (in the first PROC GLM statement that follows) and then for the old participants (in the second PROC GLM statement that follows).; PROC GLM; CLASS group; WHERE (group=1); MODEL angle0 angle4 angle8 = / NOUNI; REPEATED angle 3; Title 'Test of the Linear Component for Young Group'; MANOVA H=INTERCEPT M=(-1 0 1, -1 0 1); Title 'Test of the Quadratic Component for Young Group'; MANOVA H=INTERCEPT M=(1 -2 1, 1 -2 1); RUN; PROC GLM; CLASS group; WHERE (group=2); MODEL angle0 angle4 angle8 = / NOUNI; REPEATED angle 3; Title 'Test of the Linear Component for Old Group'; MANOVA H=INTERCEPT M=(-1 0 1, -1 0 1); Title 'Test of the Quadratic Component for Old Group'; MANOVA H=INTERCEPT M=(1 -2 1, 1 -2 1); RUN; *Testing Interaction Contrasts with D Variables: Here we explicitly form D variables to answer a hypothesis of interest. Specifically we create a new data set 'Dvars' and define the Linear and Quadratic D variables. We then test to see if the groups differ on their Linear and Quadratic D variables.; DATA Dvars; SET c14t10; Linear = -1*angle0 + 0*angle4 + 1*angle8; Quadratic = 1*angle0 + -2*angle4 + 1*angle8; PROC GLM DATA=Dvars; CLASS group; MODEL Quadratic = group; RUN; PROC GLM DATA=Dvars; CLASS group; MODEL Linear = group; RUN;