An article in Quality Progress (May 2011, pp. 42–48) describes the use of factorial experiments to improve a silver powder production process. This product is used in conductive pastes to manufacture a wide variety of products ranging from silicon wafers to elastic membrane switches. We consider powder density (g/cm2)(g/cm2) as the response variable and critical characteristics of this product.
Assume Ammonium, Stir Rate, and Temperature are factors with fixed effects, each with two levels, and the design is replicated twice.
url<-"https://raw.githubusercontent.com/tmatis12/datafiles/main/PowderProduction.csv"
df1<-read.csv(url)
df1
## Ammonium StirRate Temperature Density
## 1 2 100 8 14.68
## 2 2 100 8 15.18
## 3 30 100 8 15.12
## 4 30 100 8 17.48
## 5 2 150 8 7.54
## 6 2 150 8 6.66
## 7 30 150 8 12.46
## 8 30 150 8 12.62
## 9 2 100 40 10.95
## 10 2 100 40 17.68
## 11 30 100 40 12.65
## 12 30 100 40 15.96
## 13 2 150 40 8.03
## 14 2 150 40 8.84
## 15 30 150 40 14.96
## 16 30 150 40 14.96
library(GAD)
df1$Ammonium<-as.fixed(df1$Ammonium)
df1$StirRate<-as.fixed(df1$StirRate)
df1$Temperature<-as.fixed(df1$Temperature)
str(df1)
## 'data.frame': 16 obs. of 4 variables:
## $ Ammonium : Factor w/ 2 levels "2","30": 1 1 2 2 1 1 2 2 1 1 ...
## $ StirRate : Factor w/ 2 levels "100","150": 1 1 1 1 2 2 2 2 1 1 ...
## $ Temperature: Factor w/ 2 levels "8","40": 1 1 1 1 1 1 1 1 2 2 ...
## $ Density : num 14.68 15.18 15.12 17.48 7.54 ...
Write the model equation for a full factorial model
\[x_{ijkl}=\mu+\alpha_i+\beta_j+\gamma_k+\alpha\beta_{ij}+\alpha\gamma_{ik}+\beta\gamma_{jk}+\alpha\beta\gamma_{ijk}+\epsilon_{ijkl}\]
What factors are deemed significant, using alpha =.05 as a guide. Report final p-values of significant factors (and interaction plots if necessary)
model<-aov(Density~Ammonium+StirRate+Temperature+Ammonium*StirRate+
Ammonium*Temperature+StirRate*Temperature+
Ammonium*Temperature*StirRate, data = df1)
GAD::gad(model)
## $anova
## Analysis of Variance Table
##
## Response: Density
## Df Sum Sq Mean Sq F value Pr(>F)
## Ammonium 1 44.389 44.389 11.1803 0.010175 *
## StirRate 1 70.686 70.686 17.8037 0.002918 **
## Temperature 1 0.328 0.328 0.0826 0.781170
## Ammonium:StirRate 1 28.117 28.117 7.0817 0.028754 *
## Ammonium:Temperature 1 0.022 0.022 0.0055 0.942808
## StirRate:Temperature 1 10.128 10.128 2.5510 0.148890
## Ammonium:StirRate:Temperature 1 1.519 1.519 0.3826 0.553412
## Residuals 8 31.762 3.970
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
The p-value of the three factor interaction is 0.5534. Using an alpha = 0.05, we fail to reject the null hypothesis that there is an interaction effect of Ammonium, stir rate, and temperature.
Since the three factor interaction is not significant it will be eliminated from the model and the two factor interactions will be tested.
New Model Equation
\[x_{ijkl}=\mu+\alpha_i+\beta_j+\gamma_k+\alpha\beta_{ij}+\alpha\gamma_{ik}+\beta\gamma_{jk}+\epsilon_{ijkl}\]
model<-aov(Density~Ammonium+StirRate+Temperature+Ammonium*StirRate+
Ammonium*Temperature+StirRate*Temperature, data = df1)
GAD::gad(model)
## $anova
## Analysis of Variance Table
##
## Response: Density
## Df Sum Sq Mean Sq F value Pr(>F)
## Ammonium 1 44.389 44.389 12.0037 0.007109 **
## StirRate 1 70.686 70.686 19.1150 0.001792 **
## Temperature 1 0.328 0.328 0.0886 0.772681
## Ammonium:StirRate 1 28.117 28.117 7.6033 0.022206 *
## Ammonium:Temperature 1 0.022 0.022 0.0059 0.940538
## StirRate:Temperature 1 10.128 10.128 2.7389 0.132317
## Residuals 9 33.281 3.698
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
The interaction effect of ammonium & temperature is the most insignificant two factor interaction, p-value = 0.9405; therefore, it will be eliminated from the model equation during the next iteration.
New Model Equation
\[x_{ijkl}=\mu+\alpha_i+\beta_j+\gamma_k+\alpha\beta_{ij}+\beta\gamma_{jk}+\epsilon_{ijkl}\]
model<-aov(Density~Ammonium+StirRate+Temperature+Ammonium*StirRate+StirRate*Temperature, data = df1)
GAD::gad(model)
## $anova
## Analysis of Variance Table
##
## Response: Density
## Df Sum Sq Mean Sq F value Pr(>F)
## Ammonium 1 44.389 44.389 13.3287 0.0044560 **
## StirRate 1 70.686 70.686 21.2250 0.0009696 ***
## Temperature 1 0.328 0.328 0.0984 0.7601850
## Ammonium:StirRate 1 28.117 28.117 8.4426 0.0156821 *
## StirRate:Temperature 1 10.128 10.128 3.0412 0.1117751
## Residuals 10 33.303 3.330
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
The interaction effect of stir rate & temperature is the next insignificant two factor interaction, p-value = 0.1117; therefore, it will be eliminated from the model equation during the next iteration.
New Model Equation
\[x_{ijkl}=\mu+\alpha_i+\beta_j+\gamma_k+\alpha\beta_{ij}+\epsilon_{ijkl}\]
model<-aov(Density~Ammonium+StirRate+Temperature+Ammonium*StirRate, data = df1)
GAD::gad(model)
## $anova
## Analysis of Variance Table
##
## Response: Density
## Df Sum Sq Mean Sq F value Pr(>F)
## Ammonium 1 44.389 44.389 11.2425 0.006443 **
## StirRate 1 70.686 70.686 17.9028 0.001410 **
## Temperature 1 0.328 0.328 0.0830 0.778613
## Ammonium:StirRate 1 28.117 28.117 7.1211 0.021851 *
## Residuals 11 43.431 3.948
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
The p-value of the two factor interaction between ammonium & stir rate is 0.0219. Using an alpha = 0.05, there is sufficient evidence to reject the null hypothesis. Therefore, there is an interaction effect of ammonium and stir rate.
Since it has been determined that there is an interaction effect in our model no further hypothesis testing will be completed on the main model effects.
interaction.plot(x.factor = df1$StirRate, trace.factor = df1$Ammonium,
response = df1$Density, fun = mean,
trace.label = "NH4 %", ylab = "Mean Density",
xlab = "Stir Rate, RPM", col = c("red","blue"))
The interaction plot above illustrates the interaction effects of Ammonia and stir rate. Since the two lines are not parallel this is an indication of an interaction between the two effects, the effect of stir rate depends on the ammonia level.
At 30% ammonium, the density drops roughly 1.5 g/cm3 from 100 rpm to 150 rpm.
At 2% ammonium, the density drops 6.5 g/cm3 from 100 rpm to 150 rpm.
The concentration of ammonium effects the sensitivity of the powder density to stir rate revolutions per minute.
A full factorial experiment was conducted to determine whether either firing temperature or furnace position affects the baked density of a carbon anode.
x<-c(570,1063,565,
565,1080,510,
583,1043,590,
528,988 ,526,
547,1026,538,
521,1004,532)
temp<-rep(c(800,825,850),times=6)
position<-rep(1:2,each=9)
df2<-data.frame(position,temp,x)
df2
## position temp x
## 1 1 800 570
## 2 1 825 1063
## 3 1 850 565
## 4 1 800 565
## 5 1 825 1080
## 6 1 850 510
## 7 1 800 583
## 8 1 825 1043
## 9 1 850 590
## 10 2 800 528
## 11 2 825 988
## 12 2 850 526
## 13 2 800 547
## 14 2 825 1026
## 15 2 850 538
## 16 2 800 521
## 17 2 825 1004
## 18 2 850 532
Assume that both Temperature and Position are fixed effects. Report p-values
df2a<-df2
df2a$temp<-as.fixed(df2a$temp)
df2a$position<-as.fixed(df2a$position)
model_2a<-aov(x~position+temp+position*temp,data=df2a)
GAD::gad(model_2a)
## $anova
## Analysis of Variance Table
##
## Response: x
## Df Sum Sq Mean Sq F value Pr(>F)
## position 1 7160 7160 15.998 0.001762 **
## temp 2 945342 472671 1056.117 3.25e-14 ***
## position:temp 2 818 409 0.914 0.427110
## Residuals 12 5371 448
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
| Source | P-value |
|---|---|
| Position | 0.0018 |
| Temp | 3.25e-14 |
| Position:Temp | 0.4271 |
Assume that both Temperature and Position are random effects. Report p-values
df2b<-df2
df2b$temp<-as.random(df2b$temp)
df2b$position<-as.random(df2b$position)
model_2b<-aov(x~position+temp+position*temp,data=df2b)
GAD::gad(model_2b)
## $anova
## Analysis of Variance Table
##
## Response: x
## Df Sum Sq Mean Sq F value Pr(>F)
## position 1 7160 7160 17.504 0.0526583 .
## temp 2 945342 472671 1155.518 0.0008647 ***
## position:temp 2 818 409 0.914 0.4271101
## Residuals 12 5371 448
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
| Source | P-value |
|---|---|
| Position | 0.0527 |
| Temp | 0.0009 |
| Position:Temp | 0.4271 |
Assume the Position effect is fixed and the Temperature effect is random. Report p-values
df2c<-df2
df2c$position<-as.fixed(df2c$position)
df2c$temp<-as.random(df2c$temp)
model_2c<-aov(x~position+temp+position*temp,data=df2c)
GAD::gad(model_2c)
## $anova
## Analysis of Variance Table
##
## Response: x
## Df Sum Sq Mean Sq F value Pr(>F)
## position 1 7160 7160 17.504 0.05266 .
## temp 2 945342 472671 1056.117 3.25e-14 ***
## position:temp 2 818 409 0.914 0.42711
## Residuals 12 5371 448
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
| Source | P-value |
|---|---|
| Position | 0.0527 |
| Temp | 3.25e-14 |
| Position:Temp | 0.4271 |
Comment on similarities and/or differences between the p-values in parts a,b,c
Interaction effect of Position & Temperature
Position
Temperature
# Question 1
## Data
url<-"https://raw.githubusercontent.com/tmatis12/datafiles/main/PowderProduction.csv"
df1<-read.csv(url)
df1
df1$Ammonium<-as.fixed(df1$Ammonium)
df1$StirRate<-as.fixed(df1$StirRate)
df1$Temperature<-as.fixed(df1$Temperature)
str(df1)
## Part b
### Three factor interaction
model<-aov(Density~Ammonium+StirRate+Temperature+Ammonium*StirRate+
Ammonium*Temperature+StirRate*Temperature+
Ammonium*Temperature*StirRate, data = df1)
GAD::gad(model)
### Two factor interaction
model<-aov(Density~Ammonium+StirRate+Temperature+Ammonium*StirRate+
Ammonium*Temperature+StirRate*Temperature, data = df1)
GAD::gad(model)
model<-aov(Density~Ammonium+StirRate+Temperature+Ammonium*StirRate+StirRate*Temperature, data = df1)
GAD::gad(model)
model<-aov(Density~Ammonium+StirRate+Temperature+Ammonium*StirRate, data = df1)
GAD::gad(model)
#### Interaction plot
interaction.plot(x.factor = df1$StirRate, trace.factor = df1$Ammonium,
response = df1$Density, fun = mean,
trace.label = "NH4 %", ylab = "Mean Density",
xlab = "Stir Rate, RPM", col = c("red","blue"))
# Question 2
## Data
x<-c(570,1063,565,
565,1080,510,
583,1043,590,
528,988 ,526,
547,1026,538,
521,1004,532)
temp<-rep(c(800,825,850),times=6)
position<-rep(1:2,each=9)
df2<-data.frame(position,temp,x)
df2
## Part a
df2a<-df2
df2a$temp<-as.fixed(df2a$temp)
df2a$position<-as.fixed(df2a$position)
model_2a<-aov(x~position+temp+position*temp,data=df2a)
GAD::gad(model_2a)
## Part b
df2b<-df2
df2b$temp<-as.random(df2b$temp)
df2b$position<-as.random(df2b$position)
model_2b<-aov(x~position+temp+position*temp,data=df2b)
GAD::gad(model_2b)
## Part c
df2c<-df2
df2c$position<-as.fixed(df2c$position)
df2c$temp<-as.random(df2c$temp)
model_2c<-aov(x~position+temp+position*temp,data=df2c)
GAD::gad(model_2c)