#factorial design with replications
vp = fracDesign(k = 3, replicates = 2) #NA in response column and 2 replicates per factor combination
y = 4*vp[,1] -7*vp[,2] + 2*vp[,2]*vp[,1] + 0.2*vp[,3] + rnorm(16) #generate some data
response(vp) = y
paretoPlot(vp) #show effects and interactions (nothing significant expected)
#fractional factorial design --> Lenth Plot
vp = fracDesign(k = 4, gen = "D = ABC")
y = rnorm(8) #generate some data
response(vp) = y
paretoPlot(vp) #show effects and interactions (nothing significant expected)
Run the code above in your browser using DataLab