* ch27ta02.sas, Single-factor repeated measures design; * Wine-judging example, page 1132; options ls=80 nodate; ; data wine; input y judge wine; lines; 20 1 1 24 1 2 28 1 3 28 1 4 15 2 1 18 2 2 23 2 3 24 2 4 18 3 1 19 3 2 24 3 3 23 3 4 26 4 1 26 4 2 30 4 3 30 4 4 22 5 1 24 5 2 28 5 3 26 5 4 19 6 1 21 6 2 27 6 3 25 6 4 ; proc print; title 'Single-Factor Repeated Measures Design:'; title2 'Wine-Judging Example, Table 27.2.'; ; proc plot; plot y*wine=judge / vpos=18; ; proc glm; class judge wine; model y = judge | wine; means wine / Tukey E=judge*wine; random judge judge*wine; * SAS won't do tests with n=1; test h=wine e=judge*wine; ; proc mixed CL CovTest; class judge wine; model y = wine; random judge wine*judge; lsmeans wine / adjust=Tukey CL; ; /**************************************** Comments: 1. For this full model with n=1, there are no residuals to plot 2. Discuss carry-over effects Options: - Try to reduce carry-over effects (see page 1132) - Try to balance for carry-over effects (see LSD on page 1184) 3. Discuss order effects Options: - randomize run order - balance (see LSD on page 1184) Single-Factor Repeated Measures Design: 1 Wine-Judging Example, Table 27.2. Obs y judge wine 1 20 1 1 2 24 1 2 3 28 1 3 4 28 1 4 5 15 2 1 6 18 2 2 7 23 2 3 8 24 2 4 9 18 3 1 10 19 3 2 11 24 3 3 12 23 3 4 13 26 4 1 14 26 4 2 15 30 4 3 16 30 4 4 17 22 5 1 18 24 5 2 19 28 5 3 20 26 5 4 21 19 6 1 22 21 6 2 23 27 6 3 24 25 6 4 Single-Factor Repeated Measures Design: 2 Wine-Judging Example, Table 27.2. Plot of y*wine. Symbol is value of judge. y | 30 + 4 4 29 + 28 + 1 1 27 + 6 26 + 4 4 5 25 + 6 24 + 1 3 2 23 + 2 3 22 + 5 21 + 6 20 + 1 19 + 6 3 18 + 3 2 17 + 16 + 15 + 2 | ---+-------------------+-------------------+-------------------+-- 1 2 3 4 wine NOTE: 2 obs hidden. Single-Factor Repeated Measures Design: 3 Wine-Judging Example, Table 27.2. The GLM Procedure Class Level Information Class Levels Values judge 6 1 2 3 4 5 6 wine 4 1 2 3 4 Number of observations 24 Single-Factor Repeated Measures Design: 4 Wine-Judging Example, Table 27.2. The GLM Procedure Dependent Variable: y Sum of Source DF Squares Mean Square F Value Pr > F Model 23 373.3333333 16.2318841 . . Error 0 0.0000000 . Corrected Total 23 373.3333333 R-Square Coeff Var Root MSE y Mean 1.000000 . . 23.66667 Source DF Type I SS Mean Square F Value Pr > F judge 5 173.3333333 34.6666667 . . wine 3 184.0000000 61.3333333 . . judge*wine 15 16.0000000 1.0666667 . . Source DF Type III SS Mean Square F Value Pr > F judge 5 173.3333333 34.6666667 . . wine 3 184.0000000 61.3333333 . . judge*wine 15 16.0000000 1.0666667 . . Single-Factor Repeated Measures Design: 5 Wine-Judging Example, Table 27.2. The GLM Procedure Tukey's Studentized Range (HSD) Test for y NOTE: This test controls the Type I experimentwise error rate, but it generally has a higher Type II error rate than REGWQ. Alpha 0.05 Error Degrees of Freedom 15 Error Mean Square 1.066667 Critical Value of Studentized Range 4.07597 Minimum Significant Difference 1.7186 Means with the same letter are not significantly different. Tukey Grouping Mean N wine A 26.6667 6 3 A A 26.0000 6 4 B 22.0000 6 2 C 20.0000 6 1 Single-Factor Repeated Measures Design: 6 Wine-Judging Example, Table 27.2. The GLM Procedure Source Type III Expected Mean Square judge Var(Error) + Var(judge*wine) + 4 Var(judge) wine Var(Error) + Var(judge*wine) + Q(wine) judge*wine Var(Error) + Var(judge*wine) Single-Factor Repeated Measures Design: 7 Wine-Judging Example, Table 27.2. The GLM Procedure Dependent Variable: y Tests of Hypotheses Using the Type III MS for judge*wine as an Error Term Source DF Type III SS Mean Square F Value Pr > F wine 3 184.0000000 61.3333333 57.50 <.0001 Single-Factor Repeated Measures Design: 8 Wine-Judging Example, Table 27.2. The Mixed Procedure Model Information Data Set WORK.WINE Dependent Variable y Covariance Structure Variance Components Estimation Method REML Residual Variance Method Profile Fixed Effects SE Method Model-Based Degrees of Freedom Method Containment Class Level Information Class Levels Values judge 6 1 2 3 4 5 6 wine 4 1 2 3 4 Dimensions Covariance Parameters 3 Columns in X 5 Columns in Z 30 Subjects 1 Max Obs Per Subject 24 Observations Used 24 Observations Not Used 0 Total Observations 24 Iteration History Iteration Evaluations -2 Res Log Like Criterion 0 1 108.88011634 1 4 82.67645539 0.00200634 2 1 82.62427211 0.00011368 3 1 82.62156051 0.00000045 4 1 82.62155007 0.00000000 Convergence criteria met. Covariance Parameter Estimates Standard Z Cov Parm Estimate Error Value Pr Z Alpha Lower Upper judge 8.3999 5.4821 1.53 0.0627 0.05 3.1997 54.8853 judge*wine 0 . . . . . . Residual 1.0667 0.3895 2.74 0.0031 0.05 0.5821 2.5550 Single-Factor Repeated Measures Design: 9 Wine-Judging Example, Table 27.2. The Mixed Procedure Fit Statistics -2 Res Log Likelihood 82.6 AIC (smaller is better) 86.6 AICC (smaller is better) 87.3 BIC (smaller is better) 86.2 Type 3 Tests of Fixed Effects Num Den Effect DF DF F Value Pr > F wine 3 15 57.50 <.0001 Least Squares Means Standard Effect wine Estimate Error DF t Value Pr > |t| Alpha wine 1 20.0000 1.2561 15 15.92 <.0001 0.05 wine 2 22.0000 1.2561 15 17.51 <.0001 0.05 wine 3 26.6667 1.2561 15 21.23 <.0001 0.05 wine 4 26.0000 1.2561 15 20.70 <.0001 0.05 Least Squares Means Effect wine Lower Upper wine 1 17.3227 22.6773 wine 2 19.3227 24.6773 wine 3 23.9894 29.3440 wine 4 23.3227 28.6773 Differences of Least Squares Means Standard Effect wine _wine Estimate Error DF t Value Pr > |t| Adjustment wine 1 2 -2.0000 0.5963 15 -3.35 0.0043 Tukey-Kramer wine 1 3 -6.6667 0.5963 15 -11.18 <.0001 Tukey-Kramer wine 1 4 -6.0000 0.5963 15 -10.06 <.0001 Tukey-Kramer Differences of Least Squares Means Adj Adj Effect wine _wine Adj P Alpha Lower Upper Lower Upper wine 1 2 0.0202 0.05 -3.2710 -0.7290 -3.7186 -0.2814 wine 1 3 <.0001 0.05 -7.9376 -5.3957 -8.3853 -4.9481 wine 1 4 <.0001 0.05 -7.2710 -4.7290 -7.7186 -4.2814 Single-Factor Repeated Measures Design: 10 Wine-Judging Example, Table 27.2. The Mixed Procedure Differences of Least Squares Means Standard Effect wine _wine Estimate Error DF t Value Pr > |t| Adjustment wine 2 3 -4.6667 0.5963 15 -7.83 <.0001 Tukey-Kramer wine 2 4 -4.0000 0.5963 15 -6.71 <.0001 Tukey-Kramer wine 3 4 0.6667 0.5963 15 1.12 0.2811 Tukey-Kramer Differences of Least Squares Means Adj Adj Effect wine _wine Adj P Alpha Lower Upper Lower Upper wine 2 3 <.0001 0.05 -5.9376 -3.3957 -6.3853 -2.9481 wine 2 4 <.0001 0.05 -5.2710 -2.7290 -5.7186 -2.2814 wine 3 4 0.6844 0.05 -0.6043 1.9376 -1.0519 2.3853