• Tidak ada hasil yang ditemukan

6: II 7: III

5.2 Definitions

After some unifying definitions, this chapter will discuss 2k designs and fractions of 2k designs, alternative screening designs, and Definitive Screening designs and provide examples of creating and analyzing data from all of these using R.

factor. Other names for an interaction effect are joint effect or simultaneous effect. If there is an interaction between three factors (called a three-way interaction), then the effect of one factor will be different depending on the combination of levels of the other two factors. Four-factor interactions and higher order interactions are similarly defined.

8. Replicate runsare two or more experiments with the same settings or levels of the treatment factors, but using different experimental units. The measured response for replicate runs may be different due to changes in lurking variables or the inherent characteristics of the experimental units.

9. Duplicates refers to duplicate measurements of the same experimental unit from one run or experiment. Differences in the measured response for duplicates is due to measurement error and these values should be averaged and not treated as replicate runs in the analysis of data.

10. Experimental Design is a collection of experiments or runs that is planned in advance of the actual execution. The particular experiments chosen to be part of an experimental design will depend on the purpose of the design.

11. Randomization is the act of randomizing the order that experiments in the experimental design are completed. If the experiments are run in an order that is convenient to the experimenter rather than in a random order, it is possible that changes in the response that appear to be due to changes in one or more factors may actually be due to changes in unknown and unrecorded lurking variables. When the order of experimentation is randomized, this is much less likely to occur due to the fact that changes in factors occur in a random order that is unlikely to correlate with changes in lurking variables.

12. Confounded Factorsresults when changes in the level of one treatment factor in an experimental design correspond exactly to changes in another treatment factor in the design. When this occurs, it is impossible to tell which of the confounded factors caused a difference in the response.

13. Biased Factorresults when changes in the level of one treatment factor, in an experimental design, correspond exactly to changes in the level of a lurking variable. When a factor is biased, it is impossible to tell if any resulting changes in the response that occur between runs or experiments is due to changes in the biased factor or changes in the lurking variable.

14. Experimental error is the difference in observed response for one par- ticular experiment and the long run average response for all potential experimental units that could be tested at the same factor settings or levels.

5.3 2

k

Designs

2k designs havekfactors each studied at 2 levels.Figure 5.2shows an example of a 23 design (i.e.,k = 3). There are a total of 2×2×2 = 8 runs in this design. They represent all possible combinations of the low and high levels for each factor. In this figure the factor names are represented as A, B, and C, and the low and high levels of each factor are represented as − and +, respectively. The list of all runs is shown on the left side of the figure where the first factor (A) alternates between low and high levels for each successive pair of runs. The second factor (B) alternates between pairs of low and high levels for each successive group of four runs, and finally the last factor (C) alternates between groups of four consecutive low levels and four consecutive high levels for each successive group of eight runs. This is called the standard order of the experiments.

The values of the response are represented symbolically asywith subscripts representing the run in the design. The right side of the figure shows that each run in the design can be represented graphically as the corners of a cube. If there are replicate runs at each of the 8 combination of factor levels, the responses (y) in the figure could be replaced by the sample averages of the replicates (y) at each factor level combination.

FIGURE 5.2: Symbolic representation of a 23 Design.

With the graphical representation inFigure 5.2, it is easy to visualize the estimated factor effects. For example, the effect of factor A is the difference in the average of the responses on the right side of the cube (where factor A is at its high level) and the average of the responses on the left side of the cube.

This is illustrated inFigure 5.3.

The estimated effect of factor B can be visualized similarly as the difference in the average of the responses at the top of the cube and the average of the responses at the bottom of the cube. The estimated effect of factor C is the

FIGURE 5.3: Representation of the Effect of Factor A.

difference in the average of the responses on the back of the cube and the average of the responses at the front of the cube.

In practice the experiments in a 2kdesign should not be run in the standard order, as shown in Figure 5.1. If that were done, any changes in a lurking variable that occurred near midway through the experimentation would bias factor C. Any lurking variable that oscillated between two levels could bias factors A or B. For this reason experiments are always run in a random order, once the list of experiments is made.

If the factor effects are independent, then the average response at any combination of factor levels can be predicted with the simple additive model y=β0+βAXA+βBXB+βCXC. (5.1) Where β0 is the grand average of all the response values; βA is half the estimated effect of factor A (i.e., EA/2); βB is half the estimated effect of factor B; and βC is half the estimated effect of factor C. XA, XB, and XC

are the±coded and scaled levels of the factors shown inFigures 5.1and 5.2.

The conversion between actual factor levels and the coded and scaled factor levels are accomplished with a coding and scaling equation like:

XA= Factor level−High level+Low level

2

High levelLow level

2

.

(5.2) This coding and scaling equation converts the high factor level to +1, the low factor level to−1, and factor levels between the high and low to a value between−1 and +1. When a factor has qualitative levels like: Type A, or Type B. One level is designated as +1 and the other as−1. In this case predictions from the model can only be made at these two levels of the factor.

If the factor effects are dependent, then effect of one factor is different at each level of another factor or each combination of levels of other factors. For example, the estimated conditional main effect of factor B, calculated when factor C is held constant at its low level is

(EB|C== (y++y++)/2−(y−−−+y+−−)/2).

This can be visualized as the difference in the average of the two responses in the gray circles at the top front of the cube on the left side of Figure 5.4 and the average of the two responses in the gray circles at the bottom front of the cube shown on the left side of Figure 5.4. The estimated conditional main effect of factor B when factor C is held constant at its high level is

(EB|C=+= (y+++y+++)/2−(y−−++y++)/2).

It can be visualized on the right side ofFigure 5.4as the difference of the average of the two responses in the gray circles at top back of the cube and the average of the two responses in the gray circles at the back bottom of the cube.

FIGURE 5.4: Conditional Main Effects of B given the level of C

The B×C interaction effect is defined as half the difference in the two estimated conditional main effects as shown in Equation 5.3.

EBC=EB|C=+EB|C=

= (y+++y++++y−−−+y+−−)/4)

−(y++y+++y−−++y++)/4

(5.3)

Again this interaction effect can be seen to be the difference in the average of the responses in the gray circles and the average of the responses in the white circles shown inFigure 5.5.

If the interaction effect is not zero, then additive model in Equation 5.1 will not be accurate. Adding half of the estimated interaction effect to model

FIGURE 5.5: BC interaction effect

5.1 results in model 5.4 which will have improved predictions if the effect of factor B is different depending on the level of Factor C, or the effect of Factor C is different depending on the level of factor B.

y=β0+βAXA+βBXB+βCXC+βBCXBXC (5.4) Eachβ coefficient in this model can be calculated as half the difference in two averages, or by fitting a multiple regression model to the data. If there are replicate responses at each of the eight combinations of factor levels (in the 23 design shown inFigure 5.1) then significance tests can be used to determine which coefficients (i.e., βs) are significantly different from zero. To do that, start with the full model 5.4:

y=β0+βAXA+βBXB+βCXC (5.5)

+βABXAXB+βACXAXC+βBCXBXC+βABCXAXBXC. (5.6) The full model can be extended to 2k experiments as shown in Equation 5.7.

y=β0+

k

X

i=1

βiXi+

k

X

i=1 k

X

j6=i

βijXiXj+· · ·+βi···kXi· · ·Xk. (5.7) Any insignificant coefficients found in the full model can be removed to reach the final model.

5.3.1 Examples

In this section two examples of 2k experiments will used to illustrate the R code to design, analyze, and interpret the results.

5.3.2 Example 1: A 23 Factorial in Battery Assembly

A 23experiment was used to study the process of assembling nickel-cadmium batteries. This example is taken from Ellis Ott’s bookProcess Quality Control- Troubleshooting and Interpretation of Data[78].

Nickel-Cadmium batteries were assembled with the goal of having a consis- tently high capacitance. However much difficulty was encountered in during the assembly process resulting in excessive capacitance variability. A team was organized to find methods to improve the process. This is an example of a common cause problem. Too much variability all of the time.

While studying the entire process as normally would be done to remove a common cause problem, the team found that two different production lines in the factory were used for assembling the batteries. One of these production lines used a different concentration of nitrate than the other line. They also found that two different assembly lines were used in the factory. One line was using a shim in assembling the batteries and the other line did not. In addition, two processing stations were used in the factory; at one station, fresh hydroxide was used, while reused hydroxide was used in the second station.

The team conjectured that these differences in the assembly could be the cause of the extreme variation in the battery capacitance. They decided it would be easy to set up a 23 experiment varying the factor levels shown in Table 5.1, since they were already in use in the factory.

TABLE 5.1: Factors and Levels in Nickel-Cadmium Battery Assembly Ex- periment

Factors Level (−) Level (+)

A–Production line low level of nitrate high level of nitrate B–Assembly line using shim in assembly no shim used in assembly C–Processing Station using fresh hydroxide using reused hydroxide

The team realized that if they found differences in capacitance caused by the two different levels of factor A, then the differences may have been caused by either differences in the level of nitrite used, or other differences in the two production lines, or both. If they found a significant effect of factor A, then further experimentation would be necessary to isolate the specific cause.

A similar situation existed for both factors B and C. A significant effect of factor B could be due to whether a shim was used in assembly or due to other differences in the two assembly lines. Finally, a significant effect of factor C could be due to differences in the two processing stations or caused by the difference in the fresh and reused hydroxide.

Table 5.2 shows the eight combinations of coded factor levels and the responses for six replicate experiments or runs conducted at each combination.

The capacitance values were coded by subtracting the same constant from each value (which will not affect the results of the analysis). The actual experiments

were conducted in a random order so that any lurking variables like properties of the raw materials would not bias any of the estimated factor effects or interactions.Table 5.2is set up in the standard order of experiments that was shown inFigure 5.1.

TABLE 5.2: Factor Combinations and Response Data for Battery Assembly Experiment

XA XB XC Measured Ohms

− − − −0.1 1.0 0.6 −0.1 −1.4 0.5

+ − − 0.6 0.8 0.7 2.0 0.7 0.7

− + − 0.6 1.0 0.8 1.5 1.3 1.1

+ + − 1.8 2.1 2.2 1.9 2.6 2.8

− − + 1.1 0.5 0.1 0.7 1.3 1.0

+ − + 1.9 0.7 2.3 1.9 1.0 2.1

− + + 0.7 −0.1 1.7 1.2 1.1 −0.7

+ + + 2.1 2.3 1.9 2.2 1.8 2.5

The design can be constructed in standard order to match the published data using thefac.design()andadd.response()functions in the R package DoE.Baseas shown in the section of code below.

R>library(DoE.base)

R>design<-fac.design(nlevels=c(2,2,2),replications=6, randomize=F,factor.names=list(A=c("nitrate-1",

"nitrate-2"),B=c("Shim","No Shim"), C=c("Fresh","Reused")))

R>Capacitance<-c( -.1, .6, .6, 1.8, 1.1, 1.9, .7, 2.1, 1.0, .8, 1.0, 2.1, .5, .7, -.1, 2.3, .6, .7, .8, 2.2, .1, 2.3, 1.7, 1.9, -.1, 2.0, 1.5, 1.9, .7, 1.9, 1.2, 2.2, -1.4, .7, 1.3, 2.6, 1.3, 1.0, 1.1, 1.8, .5, .7, 1.1, 2.8, 1.0, 2.1, -.7, 2.5) R>add.response(design,Capacitance)

The R function lm() can be used to fit the full model (Equation 5.4) by least-squares regression analysis to the data from the experiment using the code below. Part of the output is shown below the code.

R>mod1<-lm(Capacitance~A*B*C, data=design) R>summary(mod1)

Coefficients:

Estimate Std. Error t value Pr(>|t|) (Intercept) 1.18750 0.08434 14.080 < 2e-16 ***

A1 0.54583 0.08434 6.472 1.03e-07 ***

B1 0.32917 0.08434 3.903 0.000356 ***

C1 0.11667 0.08434 1.383 0.174237

A1:B1 0.12083 0.08434 1.433 0.159704 A1:C1 0.04167 0.08434 0.494 0.623976 B1:C1 -0.24167 0.08434 -2.865 0.006607 **

A1:B1:C1 0.03333 0.08434 0.395 0.694768

Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.5843 on 40 degrees of freedom Multiple R-squared: 0.6354,Adjusted R-squared: 0.5715 F-statistic: 9.957 on 7 and 40 DF, p-value: 3.946e-07

‘‘‘

In the output, it can be seen that factor A and B are significant as well as the two-factor interaction BC. There is a positive regression coefficient for factor A. Since this coefficient is half the effect of A=(production line or level of nitrate) it means that a higher average capacitance is expected using production line 2 where the high concentration of nitrate was used.

Because there is a significant interaction of factors B and C, the main effect of factor B cannot be interpreted in the same way as the main effect for factor A. The significant interaction means the conditional effect of factor B=(Assembly line or use of a shim) is different depending on the level of factor C=(Processing station and fresh or reused hydroxide). The best way to visualize the interaction is by using an interaction plot. The R function interaction.plot() is used in the section of code below to produce the interaction plot shown inFigure 5.6.

R>Assembly<-design$B R>Hydroxide<-design$C

R>interaction.plot(Assembly,Hydroxide,Capacitance,type="b", pch=c(1,2),col=c(1,1))

In this figure it can be seen that the effect of using a shim in assembly reduces the capacitance by a greater amount when fresh hydroxide at processing sta- tion 1 is used than when reused hydroxide at processing station two is used.

However, the highest expected capacitance of the assembled batteries is pre- dicted to occur when using fresh hydroxide and assembly line 1 where no shim was used.

FIGURE 5.6: BC Interaction Plot

The fact that there was an interaction between assembly line and process- ing station, was at first puzzling to the team. This caused them to further investigate and resulted in the discovery of specific differences in the two as- sembly lines and processing stations. It was conjectured that standardizing the two assembly lines and processing stations would improve the battery quality by making the capacitance consistently high. A pilot run was made to check, and the results confirmed the conclusions of the 23 design experiment.

The assumptions required for a least-squares regression fit are that the variability in the model residuals (i.e., actual minus model predictions) should be constant across the range of predicted values, and that the residuals should be normally distributed. Four diagnostic plots for checking these assumptions can be easily made using the code below, and are shown inFigure 5.7.

par(mfrow=c(2,2)) plot(mod1)

par(mfrow=c(1,1))

The plot on the left indicates the spread in the residuals is approximately equal for each of the predicted values. If the spread in the residuals increased noticeably as the fitted values increased it would indicate that a more accurate model could be obtained by transforming the response variable before using

thelm() function (see Lawson[59]) for examples. The plot on the right is a normal probability plot of the residuals. Since the points fall basically along the diagonal straight line, it indicates the normality assumption is satisfied.

To understand how far from the straight line the points may lie before indicat- ing the normality assumption is contradicted, you can make repeated normal probability plots of randomly generated data using the commands:

R>z<-rnorm(40,0,1) R>qqnorm(z)

FIGURE 5.7: Model Diagnostic Plots

5.3.3 Example 2: Unreplicated 24 Factorial in Injection Mold- ing

The second example from Durakovic[26] illustrates the use of a 24 factorial, with only one replicate of each of the 16 treatment combinations. The purpose of the experiments was to improve the quality of injection-molded parts by reducing the excessive flash. This is again a common cause that makes the average flash excessive (off target). The factors that were under study and their low and high levels are shown inTable 5.3.

A full factorial design and the observed flash size for each run are shown in Table 5.4. This data is in standard order (first column changing fastest etc.) but the experiments were again run in random order.

In the R code below, the FrF2() function in the R package FrF2() is used to create this design. Like the design in Example 1, it was created in

TABLE 5.3: Factors and Levels for Injection Molding Experiment

Factors Level (−) Level (+)

A–Pack Pressure in Bar 10 30

B–Pack Time in sec. 1 5

C–Injection Speed in mm/sec 12 50

D–Screw Speed in rpm 100 200

TABLE 5.4: Factor Combinations and Response Data for Injection Molding Experiment

XA XB XC XD Flash(mm)

− − − − 0.22

+ − − − 6.18

− + − − 0.00

+ + − − 5.91

− − + − 6.60

+ − + − 6.05

− + + − 6.76

+ + + − 8.65

− − − + 0.46

+ − − + 5.06

− + − + 0.55

+ + − + 4.84

− − + + 11.55

+ − + + 9.90

− + + + 9.90

+ + + + 9.90

standard order using the argument randomize=F in theFrF2 function call.

This was to match the already collected data shown inTable 5.4. When using thefac.design() or FrF2() function to create a data collection form prior to running experiments, the argument randomize=F should be left out and the default will create a list of experiments in random order. The random order will minimize the chance of biasing any estimated factor effect with the effect of any lurking variable that may change during the course of running the experiments.

R>library(FrF2)

R>design2<-FrF2(16,4,factor.names=list(A=c(10,30),B=c(1,5), C=c(12,50),D=c(100,200)),randomize=F)

R>Flash<-c(.22,6.18,0,5.91,6.6,6.05,6.76,8.65,0.46, 5.06,0.55,4.84,11.55,9.9,9.9,9.9)

R>add.response(design2,Flash)

The R function lm() can be used to calculate the estimated regression coefficients for the full model (Equation 5.7 with k = 4). However, the Std. Error, t value, and Pr(>|t|) shown in the output for the first ex- ample cannot be calculated because there were no replicates in this example.

Graphical methods can be used to determine which effects or coefficients are significantly different from zero. If all the main effects and interactions in the full model were actually zero, then all of the estimated effects or coefficients would only differ from zero by an approximately normally distributed random error (due to the central limit theorem). If a normal probability plot were made of all the estimated effects or coefficients, any truly nonzero effects should appear as outliers on the probability plot.

The R code below shows the use of the R function lm() to fit the full model to the data, and a portion of the output is shown below the code.

R>mod2<-lm(Flash~A*B*C*D, data=design2) R>summary(mod2)

Coefficients:

Estimate Std. Error t value Pr(>|t|)

(Intercept) 5.783125 NA NA NA

A1 1.278125 NA NA NA

B1 0.030625 NA NA NA

C1 2.880625 NA NA NA

D1 0.736875 NA NA NA

A1:B1 0.233125 NA NA NA

A1:C1 -1.316875 NA NA NA

B1:C1 0.108125 NA NA NA

A1:D1 -0.373125 NA NA NA

B1:D1 -0.253125 NA NA NA

C1:D1 0.911875 NA NA NA

A1:B1:C1 0.278125 NA NA NA

A1:B1:D1 -0.065625 NA NA NA

A1:C1:D1 -0.000625 NA NA NA

B1:C1:D1 -0.298125 NA NA NA

A1:B1:C1:D1 -0.033125 NA NA NA

Residual standard error: NaN on 0 degrees of freedom Multiple R-squared: 1,Adjusted R-squared: NaN F-statistic: NaN on 15 and 0 DF, p-value: NA

The functionfullnormal()from thedaewrpackage can be used to make a normal probability plot of the coefficients (Figure 5.8) as shown in the code below.