* chapter_12_table_1 The data in Table 12.1 consist of reaction time scores for 10 participants where each participant contributes 6 scores to the analysis. In particular, each participant is exposed to each of 6 experimental conditions, which are obtained by factorially combining angle (0, 4, and 8) with noise (absent and present); LIBNAME md 'd:\data files by type\sas data files\tables'; DATA c12t1; SET md.chapter_12_table_1; * First, the tests of interest are the omnibus tests within the two-factor within-subjects ANOVA. The following SAS syntax is used to obtain the omnibus tests for the two-way within-subjects ANOVA on the data in Chapter 12, Table 1; PROC GLM; MODEL abs0 abs4 abs8 pres0 pres4 pres8 = /NOUNI; REPEATED noise 2, angle 3; RUN; * As shown on page 580, we may also want to test the marginal means of one of the within-subjects factors. In particular, we test for the quadratic effect of angle averaging over noise here. Note that the particular test of interest corresponds to the "Contrast Variable: angle_2" heading. The following SAS syntax is used to obtain the test of the quadratic trend of angle averaging over noise from the data in Chapter 12, Table 1; PROC GLM; MODEL abs0 abs4 abs8 pres0 pres4 pres8 = /NOUNI; REPEATED noise 2, angle 3 POLYNOMIAL /SUMMARY; RUN; * If one were interested in utilizing the pooled error term for the test of quadratic trend of angle, the pooled error term is the mean square used for the angle main effect through the mixed-model approach. Dividing the mean square in the numerator of the test of the quadratic trend of angle (used by the separate error term approach) by the pooled error term yields the appropriate F ratio for this test. This result should be identical to the F ratio using the pooled error term found on page 580. * Also of interest are the simple effects for angle within specific levels of noise and the simple effects for noise within specific levels of angle. The following syntax produces the results for these analyses that replicate the results found in Table 12.6. The following SAS syntax is used to obtain the tests of simple effects for the two-way within-subjects ANOVA on the data in Chapter 12, Table 1; * Test of simple effect of angle within noise absent; PROC GLM; MODEL abs0 abs4 abs8 = /NOUNI; REPEATED angle 3; RUN; * Test of simple effect of angle within noise present; PROC GLM; MODEL pres0 pres4 pres8 = /NOUNI; REPEATED angle 3; RUN; * Test of simple effect of noise within angle 0; PROC GLM; MODEL abs0 pres0 = /NOUNI; REPEATED noise 2; RUN; * Test of simple effect of noise within angle 4; PROC GLM; MODEL abs4 pres4 = /NOUNI; REPEATED noise 2; RUN; * Test of simple effect of noise within angle 8; PROC GLM; MODEL abs8 pres8 = /NOUNI; REPEATED noise 2; RUN; * Also, potentially of interest are interaction contrasts. We test the difference between angle 0 and angle 8 to determine if this difference is different for the noise present and noise absent conditions. This result obtained corresponds to the F test shown on page 583 using a separate error term. It is important to note that, as stated on page 583, using separate error terms is generally advisable, and these are the error terms used here. However, one can still use the pooled error term by running the omnibus tests and forming F tests for more specific contrasts using the error term from that analysis. The following SAS syntax is used to obtain the test of the interaction contrast shown on pages 582-583 for the two-way within-subjects ANOVA on the data in Chapter 12, Table 1 (Note that the interaction corresponds to the test of interest); PROC GLM; MODEL abs0 abs8 pres0 pres8 = /NOUNI; REPEATED noise 2, angle 2; RUN; * With respect to the adjusted univariate mixed-model tests, it should be noted that SAS provides estimates of epsilon and adjusted p-values for the Greenhouse-Geiser and Hyunh-Feldt estimators of epsilon. The results obtained for the adjusted and unadjusted omnibus tests using the SAS syntax for the omnibus tests illustrated near the beginning of this file are shown in Table 12.13;