I am running a DOE where i have generated a PB design. This ends up as a data table with my predictor variables and the experiments I need to run to generate my response variable.
I have a calculated column called IP using the variables from the design generated.
I then want to add that column to my original table.
The problem I am facing is that the values calculated for my IP column are not right (should compute according to the formula) and I don't know why?
Is there something wrong with the code?
Code:
library(Rcmdr)
library(RcmdrMisc)
library(RcmdrPlugin.DoE)
PB.DOE <- pb(nruns= 12 ,n12.taguchi= FALSE ,nfactors= 12 -1, ncenter= 0 ,
replications= 1 ,repeat.only= FALSE ,randomize= TRUE ,seed= 27241 ,
factor.names=list( A=c(100,1000),B=c(100,200),C=c(1,3),D=c(1,1.7),
E=c(1000,1500),F=c(-2,2) ) )
Code:
IP <- with(PB.DOE,(as.numeric(A)*as.numeric(B)*(5000-3000))/(141.2*as.numeric(C)*as.numeric(D)*(log10(as.numeric(E)/0.25)-(1/2)+as.numeric(F))))
Code:
final_set <- within(PB.DOE, {
IP<- ((as.numeric(A)*as.numeric(B)*(5000-3000))/(141.2*as.numeric(C)*as.numeric(D)*(log10(as.numeric(E)/0.25)-(1/2)+as.numeric(F))))
})
Is there something wrong with the code?
Last edited: