Difference between revisions of "Worksheets/Week6"

From Statistics for Engineering
Jump to navigation Jump to search
Line 10: Line 10:
     <code data-type="sample-code">
     <code data-type="sample-code">


# Define the 3 factors. This code is a template that you
# This is the half-fraction, when C = A*B
# can easily extend and reuse for full factorial designs:
A <- c(-1, +1, -1, +1)
A <- c(-1, +1, -1, +1)
B <- c(-1, -1, +1, +1)
B <- c(-1, -1, +1, +1)
Line 19: Line 18:
y <- ...
y <- ...


model.stability <- lm(y ~ A*B*C)
model.stability.poshalf <- lm(y ~ A*B*C)
summary(model.stability.half)
summary(model.stability.poshalf)


# Uncomment this line if you run the code in RStudio
# Uncomment this line if you run the code in RStudio
Line 28: Line 27:
source('https://yint.org/contourPlot.R')
source('https://yint.org/contourPlot.R')
paretoPlot(model.stability)
paretoPlot(model.stability)
# This is the other half-fraction, when C = -A*B
A <- c(-1, +1, -1, +1)
B <- c(-1, -1, +1, +1)
C <- -1 * A * B
# The response: stability [units=days]
y <- ...
model.stability.neghalf <- lm(y ~ A*B*C)
summary(model.stability.neghalf)


     </code>
     </code>
</div></html>
</div></html>

Revision as of 20:43, 31 March 2019

Part 1

Your group is developing a new product, but have been struggling to get the product’s stability, measured in days, to the level required. You are aiming for a stability value of 50 days or more.

  • A: enzyme strength: -1 == 20%; +1 == 30%
  • B: feed concentration: -1 == 5%; +1 == 15%
  • C: mixer type: -1 = R mixer; +1 = W mixer

# This is the half-fraction, when C = A*B A <- c(-1, +1, -1, +1) B <- c(-1, -1, +1, +1) C <- A * B # The response: stability [units=days] y <- ... model.stability.poshalf <- lm(y ~ A*B*C) summary(model.stability.poshalf) # Uncomment this line if you run the code in RStudio #library(pid) # Comment these 2 lines if you run this code in RStudio source('https://yint.org/paretoPlot.R') source('https://yint.org/contourPlot.R') paretoPlot(model.stability) # This is the other half-fraction, when C = -A*B A <- c(-1, +1, -1, +1) B <- c(-1, -1, +1, +1) C <- -1 * A * B # The response: stability [units=days] y <- ... model.stability.neghalf <- lm(y ~ A*B*C) summary(model.stability.neghalf)