Hello, I am running r code on r-studio for optimization of reaction conditions.
Data file: dsg.csv
C: Concentration (mg/L)
D: Dosage (mg/L)
T: Time (min)
d: Degradation (%)
install.packages("rsm")
library(rsm)
dsg <- cube(3, n0=4)
View(dsg)
dsg$C <- dsg$x120+30
dsg$D <- dsg$x21.25+1.75
dsg$T <- dsg$x3*75+105
write.csv(dsg, "dsg.csv")
str(dsg)
dsg <- as.coded.data(dsg,
x1 ~ (C-30)/20,
x2 ~ (D-1.75)/1.25,
x3 ~ (T-105)/75)
model<- rsm(d ~ FO(x1,x2,x3) + TWI(x1,x2,x3), data = dsg)
when I run the model function, it says object 'd' not found.
It is also not there in the dsg table. How should I add it (response, d)?