1 Problem 1

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) 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.

  1. Write the model equation for a full 2^3 factorial model.

\[y_{ijkl} = \mu + \alpha_i + \beta_j + \gamma_k + (\alpha\beta)_{ij} + (\alpha\gamma)_{ik} + (\beta\gamma)_{jk} + (\alpha\beta\gamma)_{ijk} + \epsilon_{ijkl}\] Where:

\(Y_{ijkl}\) = the observed response (density) for the \(l\)-th replication at the \(i\)-th level of Ammonium, \(j\)-th level of Stir Rate, and \(k\)-th level of Temperature.

\(\mu\) = Overall mean effect.

\(\alpha_i\) = the main effect of Ammonium (\(i = 1, 2\)).

\(\beta_j\) = the main effect of Stir Rate (\(j = 1, 2\)).

\(\gamma_k\) = the main effect of Temperature (\(k = 1, 2\)).

\((\alpha\beta)_{ij}, (\alpha\gamma)_{ik}, (\beta\gamma)_{jk}\) = the two-way interaction effects.

\((\alpha\beta\gamma)_{ijk}\) = the three-way interaction effect.

\(\epsilon_{ijkl}\) = random error term, assumed \(\text{N}(0, \sigma^2)\).

  1. What factors are deemed significant, using α=.05 as a guide. Report final p-values of significant factors (and interaction plots if necessary). Show all interactions in your answer, commenting which factors are dropped and why.
# Data
url <- "https://raw.githubusercontent.com/tmatis12/datafiles/main/PowderProduction.csv"
powder_data <- read.csv(url)

# Convert as factors
powder_data$Ammonium <- as.factor(powder_data$Ammonium)
powder_data$StirRate <- as.factor(powder_data$StirRate)
powder_data$Temperature <- as.factor(powder_data$Temperature)

# 2^3 factorial ANOVA table
full_model <- aov(Density ~ Ammonium * StirRate * Temperature, data = powder_data)
summary(full_model)
##                               Df Sum Sq Mean Sq F value  Pr(>F)   
## Ammonium                       1  44.39   44.39  11.180 0.01018 * 
## StirRate                       1  70.69   70.69  17.804 0.00292 **
## Temperature                    1   0.33    0.33   0.083 0.78117   
## Ammonium:StirRate              1  28.12   28.12   7.082 0.02875 * 
## Ammonium:Temperature           1   0.02    0.02   0.005 0.94281   
## StirRate:Temperature           1  10.13   10.13   2.551 0.14889   
## Ammonium:StirRate:Temperature  1   1.52    1.52   0.383 0.55341   
## Residuals                      8  31.76    3.97                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Conclusion:

Main Effects (p < 0.05):

  • Ammonium (p = 0.01018): Statistically significant.
  • Stir Rate (p = 0.00292): Statistically significant.
  • Temperature (p = 0.78117): Not significant.

Interactions:

  • Ammonium x Stir Rate (p = 0.02875): Statistically significant.
  • Ammonium x Temperature (p = 0.94281): Not significant.
  • Stir Rate x Temperature (p = 0.14889): Not significant.
  • Ammonium x Stir Rate x Temperature (p = 0.55341): Not significant.

The factor Temperature is non-significant in main effects and interactions. Therefore, Temperature can be pooled or removed to simplify the model and increase degrees of freedom for error estimation.

# Interaction plot for Ammonium and Stir Rate
with(powder_data, interaction.plot(Ammonium, StirRate, Density,
                                   type = "b", col = c("blue", "red"),
                                   pch = c(19, 17), leg.bty = "o",
                                   xlab = "Ammonium (%)",
                                   ylab = "Mean Density (g/cm^2)",
                                   trace.label = "Stir Rate (RPM)"))

This plot demonstrates that there is a significant interaction between Ammonium and Stir Rate.

2 Problem 2

A horticultural researcher wants to investigate how three controllable factors affect tomato yield in a greenhouse environment. You will use R and the agricolae package to create the experimental layout for this study.

Experimental Factors:

  • Factor A: Fertilizer Type, Levels: A₁ = Organic compost, A₂ = Chemical fertilizer
  • Factor B: Irrigation Frequency, Levels: B₁ = Once per day, B₂ = Twice per day
  • Factor C: Temperature Setting, Levels: C₁ = 22°C, C₂ = 28°C

The experimenter wants to run a full factorial design (2³ = 8 treatments) with three replications arranged in a randomized complete block design (RCBD) to control for variation between blocks (e.g., differences among greenhouse benches). Use the design.ab() function from the agricolae package to create a 2³ factorial design with a unique seed. Display the layout with $book.

library(agricolae)

# Factors for design.ab
trt <- c(2, 2, 2) # 3 factors with 2 levels each (2^3)
replication <- 3

# Seed for reproducibility
set.seed(144)

# RCBD
rcbd <- design.ab(trt, replication, design = "rcbd", seed = 144)

# Layout $book
print("Experimental Layout ($book):")
## [1] "Experimental Layout ($book):"
print(rcbd$book)
##    plots block A B C
## 1    101     1 2 2 2
## 2    102     1 1 2 2
## 3    103     1 1 1 1
## 4    104     1 1 2 1
## 5    105     1 1 1 2
## 6    106     1 2 1 2
## 7    107     1 2 1 1
## 8    108     1 2 2 1
## 9    109     2 1 1 1
## 10   110     2 1 1 2
## 11   111     2 1 2 2
## 12   112     2 2 2 2
## 13   113     2 2 1 2
## 14   114     2 2 2 1
## 15   115     2 2 1 1
## 16   116     2 1 2 1
## 17   117     3 1 2 2
## 18   118     3 2 2 1
## 19   119     3 1 2 1
## 20   120     3 2 2 2
## 21   121     3 1 1 1
## 22   122     3 2 1 1
## 23   123     3 1 1 2
## 24   124     3 2 1 2

3 Complete R Code

knitr::opts_chunk$set(echo = TRUE, warning=FALSE, message = FALSE)

# Problem 1
# Data
url <- "https://raw.githubusercontent.com/tmatis12/datafiles/main/PowderProduction.csv"
powder_data <- read.csv(url)

# Convert as factors
powder_data$Ammonium <- as.factor(powder_data$Ammonium)
powder_data$StirRate <- as.factor(powder_data$StirRate)
powder_data$Temperature <- as.factor(powder_data$Temperature)

# 2^3 factorial ANOVA table
full_model <- aov(Density ~ Ammonium * StirRate * Temperature, data = powder_data)
summary(full_model)

# Interaction plot for Ammonium and Stir Rate
with(powder_data, interaction.plot(Ammonium, StirRate, Density,
                                   type = "b", col = c("blue", "red"),
                                   pch = c(19, 17), leg.bty = "o",
                                   xlab = "Ammonium (%)",
                                   ylab = "Mean Density (g/cm^2)",
                                   trace.label = "Stir Rate (RPM)"))


# Problem 2
library(agricolae)

# Factors for design.ab
trt <- c(2, 2, 2) # 3 factors with 2 levels each (2^3)
replication <- 3

# Seed for reproducibility
set.seed(144)

# RCBD
rcbd <- design.ab(trt, replication, design = "rcbd", seed = 144)

# Layout $book
print("Experimental Layout ($book):")
print(rcbd$book)