ST 516 Experimental Statistics for Engineers II The 2 3 Design Notations for factor combinations (each combination is a treatment): +/- Coding Treatment Binary Coding Run A B C Labels A B C 1 - - - (1) 0 0 0 2 + - - a 1 0 0 3 - + - 0 1 0 b 4 + + - ab 1 1 0 5 - - + 0 0 1 c 6 + - + ac 1 0 1 7 - + + 0 1 1 bc 8 + + + abc 1 1 1 The 2 k Factorial Design The 2 3 Design 1 / 17
ST 516 Experimental Statistics for Engineers II Main Effects Recall: (1) is also the total of responses for treatment combination (1), etc. Simple effects of A : a / n − (1) / n , ab / n − b / n , ac / n − c / n , and abc / n − bc / n . Main effect of A is the average of these 4 simple effects: A = [ a − (1)] + ( ab − b ) + ( ac − c ) + ( abc − bc ) . 4 n The 2 k Factorial Design The 2 3 Design 2 / 17
ST 516 Experimental Statistics for Engineers II Main effect of A is also the difference between average response with A at its high level, and average response with A at its low level: A = a + ab + ac + abc − (1) + b + c + bc 4 n 4 n = ( a + ab + ac + abc ) − [(1) + b + c + bc ] . 4 n The 2 k Factorial Design The 2 3 Design 3 / 17
ST 516 Experimental Statistics for Engineers II Interactions The 4 simple effects of A can be divided into: 2 at the high level of B , abc / n − bc / n and ab / n − b / n ; 2 at the low level of B , ac / n − c / n and a / n − (1) / n . The AB interaction is (one half of) the difference between their averages: � 1 AB = 1 2 n [ abc − bc + ab − b ] − 1 � 2 n [ ac − c + a − (1)] 2 = abc − bc + ab − b − ac + c − a + (1) 4 n The 2 k Factorial Design The 2 3 Design 4 / 17
ST 516 Experimental Statistics for Engineers II The AB interaction may be written as the sum of terms involving the high level of C ; terms involving the low level of C : AB = 1 4 n [ abc − bc − ac + c ] + 1 4 n [ ab − b − a + (1)] The ABC interaction is the difference between those parts: ABC = 1 4 n [ abc − bc − ac + c ] − 1 4 n [ ab − b − a + (1)] = abc − bc − ac + c − ab + b + a − (1) . 4 n The 2 k Factorial Design The 2 3 Design 5 / 17
ST 516 Experimental Statistics for Engineers II Contrast Coefficients Treatment Effect Combination I A B AB C AC BC ABC (1) + - - + - + + - + + - - - - + + a b + - + - - + - + + + + + - - - - ab c + - - + + - - + + + - - + + - - ac bc + - + - + - + - + + + + + + + + abc Product of any pair of columns equals another column: A × B = AB , A × AB = B , etc. The 2 k Factorial Design The 2 3 Design 6 / 17
ST 516 Experimental Statistics for Engineers II Example: Etch Rate Of A Plasma Etching Tool Response: etch rate in ˚ A/min. Factors Factor Units Low High Gap cm 0.8 1.2 A B C 2 F 6 flow SCCM 125 200 Power W 275 325 C C 2 F 6 = Hexafluoroethane; SCCM = Standard Cubic Centimeters per Minute; The 2 k Factorial Design The 2 3 Design 7 / 17
ST 516 Experimental Statistics for Engineers II The data (plasma.txt): A B C Rep1 Rep2 - - - 550 604 + - - 669 650 - + - 633 601 + + - 642 635 - - + 1037 1052 + - + 749 868 - + + 1075 1063 + + + 729 860 Read and reshape: plasma <- read.table("data/plasma.txt", header = TRUE) plasmaLong <- reshape(plasma, varying = c("Rep1", "Rep2"), v.names = "Rate", direction = "long", timevar = "Rep") The 2 k Factorial Design The 2 3 Design 8 / 17
ST 516 Experimental Statistics for Engineers II Analysis of Variance summary(aov(Rate ~ A * B * C, plasmaLong)) Output Df Sum Sq Mean Sq F value Pr(>F) A 1 41311 41311 18.3394 0.0026786 ** B 1 218 218 0.0966 0.7639107 C 1 374850 374850 166.4105 1.233e-06 *** A:B 1 2475 2475 1.0988 0.3251679 A:C 1 94403 94403 41.9090 0.0001934 *** B:C 1 18 18 0.0080 0.9308486 A:B:C 1 127 127 0.0562 0.8185861 Residuals 8 18020 2253 --- Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1 The 2 k Factorial Design The 2 3 Design 9 / 17
ST 516 Experimental Statistics for Engineers II Effects calculated from coded variables summary(lm(Rate ~ coded(A) * coded(B) * coded(C), plasmaLong)) Output Call: lm(formula = Rate ~ coded(A) * coded(B) * coded(C), data = plasmaLong) Residuals: Min 1Q Median 3Q Max -6.550e+01 -1.113e+01 1.332e-15 1.112e+01 6.550e+01 The 2 k Factorial Design The 2 3 Design 10 / 17
ST 516 Experimental Statistics for Engineers II Output, continued Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 776.062 11.865 65.406 3.32e-12 *** coded(A) -50.812 11.865 -4.282 0.002679 ** coded(B) 3.687 11.865 0.311 0.763911 coded(C) 153.062 11.865 12.900 1.23e-06 *** coded(A):coded(B) -12.437 11.865 -1.048 0.325168 coded(A):coded(C) -76.813 11.865 -6.474 0.000193 *** coded(B):coded(C) -1.062 11.865 -0.090 0.930849 coded(A):coded(B):coded(C) 2.812 11.865 0.237 0.818586 --- Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1 Residual standard error: 47.46 on 8 degrees of freedom Multiple R-Squared: 0.9661, Adjusted R-squared: 0.9364 F-statistic: 32.56 on 7 and 8 DF, p-value: 2.896e-05 Note “Estimate” column must be doubled to match conventional effects. The 2 k Factorial Design The 2 3 Design 11 / 17
ST 516 Experimental Statistics for Engineers II This example has replicated treatments, so we have an estimate of σ 2 , and can test significance of estimated effects. In examples with more factors, or with zero df for error, the half-normal plot is a useful supplement to the table of estimated effects: library(gplots) qqnorm(aov(Rate ~ A * B * C, plasmaLong), label = TRUE) The option label = TRUE allows labeling points in the plot. The half-normal plot is based on | effect | ; the (full) normal plot is based on the signed effects; use option full = TRUE . The 2 k Factorial Design The 2 3 Design 12 / 17
ST 516 Experimental Statistics for Engineers II Under the null hypothesis that no factor affects the response, all estimated effects are normally distributed with zero mean and the same variance, and the Q-Q plot is a straight line. Any non-zero population effect makes the corresponding estimated effect larger, which then looks like an “outlier”, standing out from the line of small effects. You can get more small effects in the plot by including Rep in the model (in a CRD it cannot have any true effect): qqnorm(aov(Rate ~ A * B * C * Rep, plasmaLong), label = TRUE) JMP includes these “null” effects in the half-normal plot. The 2 k Factorial Design The 2 3 Design 13 / 17
ST 516 Experimental Statistics for Engineers II Reduced model with only A , C , and AC : Df Sum Sq Mean Sq F value Pr(>F) A 1 41311 41311 23.767 0.0003816 *** C 1 374850 374850 215.661 4.951e-09 *** A:C 1 94403 94403 54.312 8.621e-06 *** Residuals 12 20858 1738 --- Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1 Note: R does not break “Residuals” line into “Lack of Fit” and “Pure Error”. “Pure Error” is the Residuals line from the full model ANOVA. The 2 k Factorial Design The 2 3 Design 14 / 17
ST 516 Experimental Statistics for Engineers II Call: lm(formula = Rate ~ coded(A) * coded(C), data = plasmaLong) Residuals: Min 1Q Median 3Q Max -72.50 -15.44 2.50 18.69 66.50 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 776.06 10.42 74.458 < 2e-16 *** coded(A) -50.81 10.42 -4.875 0.000382 *** coded(C) 153.06 10.42 14.685 4.95e-09 *** coded(A):coded(C) -76.81 10.42 -7.370 8.62e-06 *** --- Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1 Residual standard error: 41.69 on 12 degrees of freedom Multiple R-Squared: 0.9608, Adjusted R-squared: 0.9509 F-statistic: 97.91 on 3 and 12 DF, p-value: 1.054e-08 The 2 k Factorial Design The 2 3 Design 15 / 17
ST 516 Experimental Statistics for Engineers II Can get “Lack of Fit” by including A : B : C interaction: > summary(aov(Rate ~ A * C + A : B : C, plasmaLong)); Df Sum Sq Mean Sq F value Pr(>F) A 1 41311 41311 18.3394 0.0026786 ** C 1 374850 374850 166.4105 1.233e-06 *** A:C 1 94403 94403 41.9090 0.0001934 *** A:C:B 4 2837 709 0.3149 0.8603536 Residuals 8 18021 2253 --- Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1 Now we interpret the A : B : C line as “Lack of Fit”, and the Residuals line as “Pure Error”. The 2 k Factorial Design The 2 3 Design 16 / 17
ST 516 Experimental Statistics for Engineers II Interpreting the Interaction The AC interaction is larger than the main effect of A. with(plasmaLong, interaction.plot(A, C, Rate, type = "b")) with(plasmaLong, interaction.plot(C, A, Rate, type = "b")) 1000 2 1000 1 C A mean of Rate mean of Rate 2 + 1 − 1 − 2 + 800 800 2 2 1 2 600 600 1 1 − + − + A C The 2 k Factorial Design The 2 3 Design 17 / 17
Recommend
More recommend