STAT512 Analysis of Covariance In Minitab Example 1 An experiment has been set up to determine the effectiveness of three new ergonomic designs for airplane control panels. Twentyfour pilots have been randomly selected for the experiment and assigned to training in a flight simulator that contains one of the control panels (eight planes per panel). After completion of training on their respective control panels, the pilots are presented with eight emergency situations in the flight simulator. The emergency situations are presented in random order, and the total time (in seconds) required to make all emergency responses is recorded for each pilot. These data are found in the table below. The only factor of interest in this experiment is panel configuration. The response variable is reaction time. The table also gives the number of years of experience each pilot has. The latter variable is not controlled by the experimenter, but this uncontrolled variable (or covariate) may influence reaction time. How can the effect of the covariate be accounted for in the analysis of the data. Inputting Data: Reaction Time 6.7 6.1 6.0 5.9 7.3 7.7 6.0 6.4 5.8 6.5 6.8 6.3 6.0 5.4 5.7 5.4 6.0 6.5 7.0 7.0 7.2 6.8 6.6 7.4 Years Experience 7.7 17.4 10.7 22.1 6.1 4.1 16.5 8.8 11.2 2.6 4.1 5.3 4.7 13.1 14.6 8.1 13.8 8.2 7.0 6.0 10.9 11.2 8.9 3.0 Panel 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 3.0 3.0 3.0 3.0 3.0 3.0 3.0 3.0 Indicator 1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Indicator 2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 Minitab Commands for Scatterplot: GRAPH > SCATTERPLOT > WITH GROUPS > OK > Y-VARIABLE Reaction Time > X-VARIABLE Years of Experience > CATEGORICAL VARIABLE Panel > OK Reaction Time for the Three Panels with Covariate Years of Experience 8.0 Panel 1 2 3 Reaction Time 7.5 7.0 6.5 6.0 5.5 0 5 10 15 Years of Experience 20 25 Results from Performing One-Way Analysis of Variance Note: These results can be used for comparison purposes later to learn if any benefits are achieved from performing an analysis of covariance. One-way ANOVA: Reaction Time versus Panel Source Panel Error Total DF 2 21 23 SS 2.790 6.346 9.136 MS 1.395 0.302 F 4.62 P 0.022 H0: 1 2 3 Ha: At least two of the treatment means are unequal =.05 F=4.62 P=.022 Reject H0 in favor of Ha. The data provide sufficient evidence to conclude that at least two of the treatment means are unequal. Results from Performing an Analysis of Covariance COMMANDS: STAT > ANOVA > GENERAL LINEAR MODEL > RESPONSE Reaction Time MODEL ‘Years of Experience’ ‘Panel’ > COVARIATE Years of Experience > OK > OK Analysis of Variance for Reaction Time, using Adjusted SS for Tests Source Panel Years of Experience Error Total DF 2 1 20 23 Seq SS 2.7900 3.9175 2.4288 9.1363 Adj SS 3.8574 3.9175 2.4288 Adj MS 1.9287 3.9175 0.1214 F 15.88 32.26 P 0.000 0.000 H0: Adj,1 Adj, 2 Adj,3 Ha: At least two of the adjusted treatment means are unequal =.05 F=15.88 P=.000 Reject H0 in favor of Ha. The data provide sufficient evidence to conclude that at least two of the adjusted treatment means are unequal. Note: Compared with the one-way analysis of variance, the analysis of covariance has provided stronger evidence against the null hypothesis. How Estimated Adjusted Treatment Means are Calculated COMMANDS: STAT > REGRESSION > REGRESSION > RESPONSE VARIABLE Reaction Time > PREDICTOR VARIABLES ‘Years of Experience’ ‘Indicator 1’ ‘Indicator 2’ > OK Regression Analysis: Reaction Tim versus Years of Exp, Indicator 1, ... The regression equation is Reaction Time = 7.55 - 0.0885 Years of Experience - 0.853 Indicator 1 + 0.030 Indicator 2 Predictor Constant Years of Experience Indicator 1 Indicator 2 S = 0.348480 Coef 7.5453 -0.08846 -0.8534 0.0302 R-Sq = 73.4% SE Coef 0.2197 0.01558 0.1836 0.1806 T 34.35 -5.68 -4.65 0.17 P 0.000 0.000 0.000 0.869 R-Sq(adj) = 69.4% From the output above, ŷ = 7.545 - .088YrsExp - .853Indicator1 + .03Indicator2 The estimated adjusted treatment means can be obtained using the following regression equations: Control Panel 1: ŷ =7.545 - .088YrsExp - .853(0) + .03(0) = 7.545 - .088YrsExp Control Panel 2: ŷ =7.545 - .088YrsExp - .853(1) + .03(0) = 6.692 - .088YrsExp Control Panel 3: ŷ =7.545 - .088YrsExp - .853(0) + .03(1) = 7.575 - .088YrsExp Estimated adjusted treatment means are calculated at the overall mean for YrsExp which is 9.42. Thus the estimated adjusted treatment mean for control panel 1 is Control Panel 1: ŷ = 7.545 - .088YrsExp = 7.545-.088(9.42) = 6.7 Pairwise Comparisons Using Bonferroni Procedure COMMANDS: STAT > ANOVA > GENERAL LINEAR MODEL > RESPONSE Reaction Time MODEL ‘Years of Experience’ ‘Panel’ > COVARIATE Years of Experience > OK > COMPARISONS > TERMS Panel > Bonferroni > OK > OK Grouping Information Using Bonferroni Method and 95.0% Confidence Panel 3 1 2 N 8 8 8 Mean 6.7 6.7 5.9 Grouping A A B Means that do not share a letter are significantly different. Bonferroni 95.0% Simultaneous Confidence Intervals Response Variable Reaction Time All Pairwise Comparisons among Levels of Panel Panel = 1 subtracted from: Panel 2 3 Lower -1.333 -0.442 Panel = 2 Panel 3 Center -0.8534 0.0302 Upper -0.3738 0.5020 -------+---------+---------+--------(-----*-----) (-----*-----) -------+---------+---------+---------0.80 0.00 0.80 subtracted from: Lower 0.4276 Center 0.8836 Upper 1.340 -------+---------+---------+--------(-----*-----) -------+---------+---------+---------0.80 0.00 0.80 Assessing Reasonableness of Normality and Equal Variance Assumption COMMANDS: STAT > ANOVA > GENERAL LINEAR MODEL > RESPONSE Reaction Time MODEL ‘Years of Experience’ ‘Panel’ > COVARIATE Years of Experience > GRAPHS > ‘Histogram of Residuals’ ‘Normal Plot of Residuals’ ‘Residuals versus fits’ > OK > OK Assessing Reasonableness of Normality Assumption Histogram Normal Probability Plot (response is Reaction Time) (response is Reaction Time) 99 5 95 4 90 Frequency Percent 80 70 60 50 40 30 3 2 20 10 1 5 1 -0.8 -0.6 -0.4 -0.2 0.0 Residual 0.2 0.4 0.6 0 0.8 -0.6 -0.3 0.0 Residual 0.3 0.6 From the above plots, the normality assumption is reasonable. Assessing Reasonableness of Equal Variance Assumption Versus Fits (response is Reaction Time) 0.50 Residual 0.25 0.00 -0.25 -0.50 -0.75 5.5 6.0 6.5 Fitted Value 7.0 7.5 From the above plots, the equal variance assumption is reasonable. Assessing Reasonableness of Equal Slopes Assumption COMMANDS: STAT > ANOVA > GENERAL LINEAR MODEL > RESPONSE Reaction Time MODEL ‘Years of Experience’ ‘Panel’ ‘Years of Experience*Panel’ > COVARIATE Years of Experience > OK > OK Source Panel Years of Experience Panel*Years of Experience Error Total DF 2 1 2 18 23 Seq SS 2.7900 3.9175 0.0015 2.4272 9.1363 Adj SS 0.8226 3.0918 0.0015 2.4272 Adj MS 0.4113 3.0918 0.0008 0.1348 F 3.05 22.93 0.01 P 0.072 0.000 0.994 H0: Panel and Years of Experience Do Not Interact (The slopes of the different treatment regression lines are equal) Ha: Panel and Years of Experience Do Interact =.05 F = .01 p-value=.994 Fail to reject H0. The assumption of equal slopes for the different treatment regression lines is reasonable.