# In libraries FrF2 and qualityTools you can, e.g., analyze various interesting properties of fractional designs. # NOTE: You have to install the packeges "FrF2" and "qualityTools" first! # Consider the commands below for the considered data set in Lab 5: library(FrF2) library(qualityTools) dat <- read.delim("datalab5.txt", header=TRUE) y=dat$y MyDesign = fracDesign(k = 5, p = 1) runOrd(MyDesign) =standOrd(MyDesign) response(MyDesign) = y names(MyDesign)<-c("A","B","C","D","E") #The Design-matrix summary(MyDesign) #See the counfonding pattern: aliasTable(MyDesign) #Normal plot of effects: m <- lm(y ~ A*B*C*D*E , data = MyDesign) BsMD::DanielPlot(m) #Anova-results for the chosen model: MyModel = aov(y ~ A+B+C+D+E+A:B+A:C+B:C , dat = MyDesign) summary(MyModel) #Calculate the mean effects: effect.estimates=2*coefficients(lm(y ~ A*B*C*D*E , data = MyDesign)) effect.estimates