程序代做 Math 558 Lecture #21

Math 558 Lecture #21

A factorial design
By a factorial design, we mean that in each complete trial or replicate of the experiment all possible combinations of the lev- els of the factors are investigated. For example, if there are m levels of factor A and n levels of factor B, each replicate contains all mn treatment combinations. When factors are ar- ranged in a factorial design, they are often said to be crossed. (Montgomery, 2012 pg 184)

Copyright By PowCoder代写 加微信 powcoder

Calculation of the main effects and interactions 2×2 Factorial Experiment
We will use the notation by Yates for these calculations. Let A and B denote the factors and a and b, denote the second levels of these factors. The first level will be indicated by the absence of the corresponding letter. The symbol (ab) will denote both factor at the second level. The symbol 1 will denote both factors at the first level. The letters A, B, and AB, when they refer to numbers, will present, respectively, the main effects of A and B and the interaction by AB.

Calculation of the main effects and interactions 2×2 Factorial Experiment
A = 12[(ab)−(b)+(a)−(1)]
B = 12[(ab)+(b)−(a)−(1)] AB = 12[(ab)−(b)−(a)+(1)]
The simple effects can be calculated as
(a) − (1) = simple effect of A when b is at the first level
(ab) − (b) = simple effect of A when b is at the second level

Another example Without interaction
Consider a two factor experiment with the following response. Here (−) and (+) denote the factors at the first and second levels respectively.
level combinations response A/B
— 20 -+ 30 +- 40 ++ 52

With Interaction
level combinations response A/ B
— 20 -+ 40 +- 50 ++ 12

Using formula to find the effects Without interaction
A = 12[(ab)−(b)+(a)−(1)] A = 12 [52 − 30 + 40 − 20] = 21 B = 12[(ab)+(b)−(a)−(1)] B = 12 [52 + 30 − 40 − 20] = 11 AB = 12[(ab)−(b)−(a)+(1)] AB = 12 [52 − 30 − 40 + 20] = 1

Using formula to find the effects With interaction
Using the same formula
B=−9 AB = − 29

Another way to describe interaction
Another way to describe interaction is through regression model. Consider an experiment with two factors. The following regression model can be used to model the response.
Y = β0 +β1X1 +β2X2 +β1β2X1X2 +ε
Here X1 and X2 represent the factors A and B respectively and X1X2 represent the interaction between A and B. Whereas ε is a random error term. The factor variation can be represented by the codes (-) for the first and (+) second level. It can be shown that the parameters can be estimated by the effect estimates as follows.
βˆ0 =1n(sumofnresponses)
βˆ2 =0.5B βˆ1βˆ2 =0.5AB

Fitted Response
Yˆ = 35.5 + 10.5X1 + 5.5X2 + 0.5X1X2
The parameter estimates obtained using the method above for the factorial design with all factors at two levels (- and +) turn out to be least squares estimates.
c1<-c(+1,+1,-1,-1) c2<-c(+1,-1,+1,-1) Response<-c(20,30,40, 52 ) Model1 = lm(Response ∼ c1+c2) summary(Model1) lm(formula = Response Residuals: 0.5 -0.5 -0.5 0.5 Coefficients: (Intercept) c1 Estimate Std. Error 35.5 0.5 -10.5 0.5 -5.5 0.5 t value 71 -21 -11 Pr(>|t|) 0.00897 ** 0.03029 * 0.05772 .
— Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 1 on 1 degrees of freedom
Multiple R-squared: 0.9982, Adjusted R-squared: 0.9947 F-statistic: 281 on 2 and 1 DF, p-value: 0.04214

including interaction term
c1<-c(+1,+1,-1,-1) c2<-c(+1,-1,+1,-1) c3<-c(+1,-1,-1,+1) Response<-c(20,30,40, 52 ) Model2 = lm(Response c1+c2+c3) summary(Model2) Fitted Response Call: lm(formula = Response c1 + c2 + c3) Residuals: ALL 4 residuals are 0: no residual degrees of freedom! Coefficients: (Intercept) c1 Estimate Std. Error 35.5 NaN -10.5 NaN -5.5 NaN 0.5 NaN NaN NaN NaN NaN NaN NaN NaN NaN Residual standard error: NaN on 0 degrees of freedom Multiple R-squared: 1, Adjusted R-squared: NaN F-statistic: NaN on 3 and 0 DF, p-value: NA Without Interaction c1<-c(+1,+1,-1,-1) c2<-c(+1,-1,+1,-1) c3<-c(+1,-1,-1,+1) Response<-c(20,40,50, 12 ) Model3 = lm(Response c1+c2+c3) summary(Model3) Coefficients: Estimate Std. (Intercept) 30.5 c2 4.5 c3 -14.5 The empirical model The above calculations can be used to determine an empirical model of a response using a 2k factorial design when we have small number of factors and the experimental design is without replications. In this case the number of runs is equal to the number of parameters in the model. Because we have one more experiment than there are variables in our empirical model, the summary provides some information on the significance of the model’s parameters; however, with just one degree of freedom this information is not really reliable. 程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com