Display Half Normal Plot
library(DoE.base)
## Warning: package 'DoE.base' was built under R version 4.2.2
## Loading required package: grid
## Loading required package: conf.design
## Registered S3 method overwritten by 'DoE.base':
## method from
## factorize.factor conf.design
##
## Attaching package: 'DoE.base'
## The following objects are masked from 'package:stats':
##
## aov, lm
## The following object is masked from 'package:graphics':
##
## plot.design
## The following object is masked from 'package:base':
##
## lengths
FA<-rep(c(-1,1),8)
FB<-rep(c(-1,-1,1,1),4)
FC<-rep(c(-1,-1,-1,-1,1,1,1,1),2)
FD<-c(rep(-1,8), rep(1,8))
Obs_13<-c(12,18,13,20,17,25,15,25,10,24,13,24,19,21,17,23)
Data_13<-data.frame(FA,FB,FC,FD,Obs_13)
model_13<- lm(Obs_13~FA*FB*FC*FD, data = Data_13)
coef(model_13)
## (Intercept) FA FB FC FD FA:FB
## 18.500 4.000 0.250 1.750 0.375 0.250
## FA:FC FB:FC FA:FD FB:FD FC:FD FA:FB:FC
## -0.750 -0.500 0.125 0.125 -0.625 0.500
## FA:FB:FD FA:FC:FD FB:FC:FD FA:FB:FC:FD
## -0.125 -1.375 0.125 0.375
halfnormal(model_13)
##
## Significant effects (alpha=0.05, Lenth method):
## [1] FA FC FA:FC:FD
Comment: From Half-normal plot, we found that Factor A, Factor C and Interaction of Factor A:C:D are significant, so we can’t neglect Factor D due to interaction with Factor A and Factor C.
Model_132<- lm(Obs_13~FA+FC+FD+FA*FC+FA*FD+FC*FD+FA*FC*FD, data = Data_13)
coef(Model_132)
## (Intercept) FA FC FD FA:FC FA:FD
## 18.500 4.000 1.750 0.375 -0.750 0.125
## FC:FD FA:FC:FD
## -0.625 -1.375
summary(Model_132)
##
## Call:
## lm.default(formula = Obs_13 ~ FA + FC + FD + FA * FC + FA * FD +
## FC * FD + FA * FC * FD, data = Data_13)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5 -1.0 0.0 1.0 1.5
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 18.5000 0.3187 58.050 8.61e-12 ***
## FA 4.0000 0.3187 12.551 1.52e-06 ***
## FC 1.7500 0.3187 5.491 0.00058 ***
## FD 0.3750 0.3187 1.177 0.27314
## FA:FC -0.7500 0.3187 -2.353 0.04643 *
## FA:FD 0.1250 0.3187 0.392 0.70513
## FC:FD -0.6250 0.3187 -1.961 0.08550 .
## FA:FC:FD -1.3750 0.3187 -4.315 0.00256 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.275 on 8 degrees of freedom
## Multiple R-squared: 0.9645, Adjusted R-squared: 0.9334
## F-statistic: 31.03 on 7 and 8 DF, p-value: 3.475e-05
Comment: Here from summary of updates model, we found out that Factor A, Factor C and Interaction Factor A : Factor C and Factor A: Factor C : Factor D (Interaction ) is significant in model.