/* SAS Example with Mixed Effect Model */ /* Training Data Example */ /* These are NOT the same data as in the training example in the book! */ options linesize=80 pagesize=64; DATA training; INPUT method instructor improvement; cards; 1 1 54.93 1 2 46.29 1 3 47.14 1 4 39.72 1 5 49.32 1 1 40.33 1 2 56.33 1 3 48.54 1 4 60.89 1 5 50.25 1 1 54.08 1 2 48.51 1 3 52.40 1 4 54.98 1 5 48.96 1 1 45.39 1 2 52.42 1 3 56.59 1 4 44.13 1 5 46.37 2 1 19.07 2 2 30.74 2 3 30.35 2 4 29.85 2 5 30.92 2 1 32.22 2 2 24.23 2 3 32.54 2 4 23.99 2 5 25.04 2 1 27.12 2 2 14.19 2 3 28.28 2 4 24.67 2 5 27.54 2 1 29.18 2 2 35.32 2 3 23.51 2 4 29.06 2 5 25.14 3 1 32.92 3 2 20.99 3 3 28.65 3 4 32.25 3 5 21.21 3 1 29.83 3 2 36.29 3 3 31.35 3 4 26.93 3 5 34.68 3 1 35.59 3 2 27.31 3 3 21.22 3 4 28.29 3 5 36.33 3 1 18.53 3 2 23.54 3 3 31.12 3 4 33.22 3 5 30.59 4 1 27.18 4 2 22.07 4 3 36.81 4 4 28.11 4 5 26.4 4 1 36.45 4 2 29.66 4 3 26.21 4 4 38.15 4 5 43.22 4 1 44.9 4 2 33.57 4 3 25.49 4 4 23.67 4 5 32.52 4 1 29.13 4 2 26.42 4 3 22.8 4 4 45.81 4 5 31.36 ; PROC GLM data=training; CLASS method instructor; MODEL improvement = method instructor method*instructor; RANDOM instructor method*instructor; TEST h=method e=method*instructor; MEANS method / TUKEY CLDIFF ALPHA=0.05 e=method*instructor; run; /* We use the RANDOM statement to tell SAS that "instructor" has random levels. */ /* For the test about the fixed-effect factor (method), we must tell SAS, using */ /* a TEST statement, that the correct denominator is MSAB (method*instructor). */ /* Note the correct results of this test (F*=135.7, P-value < .0001) are given */ /* on a separate page of output. */ /* Since there was a significant effect due to method, we can use Tukey's procedure */ /* to determine which methods specifically differ. At family significance level 0.05, */ /* method 1 differs from each of methods 2, 3, and 4. In addition, methods 2 and 4 */ /* are significantly different. */ /* Note that again we tell SAS to use MSAB (method*instructor) in place of MSE */ /* by putting e=method*instructor in the MEANS statement. */ /***************************************************************************************/