data(DataNAT) # dataset
Exp <- DataNAT[,2] # identification of experiments
X <- DataNAT[,3:6] # independent variable
Y <- DataNAT[,11] # dependent variable
# effects of the blends in a reference mixture
Effects <- rep(c(-0.1,0,0.1,0.2,0.3,0.4,0.5,0.6,0.7),4)
Conc <- as.matrix(DataNAT[,7]) # covariate (process variable)
Res <- Blend(exp = Exp, X = X, Y = Y, conc = Conc, effects = Effects)
print("Predicted and observed values"); Res$MPred
print("Values predicted by components:"); Res$MCPred
print("Design of the experiments:"); Res$Mexp
print("Estimates of the linear model parameters:"); Res$theta
Tit <- c("Covariate (process variable)","Variable")
Xlab = "effects" # label of the X axis
Ylab = "Predicted values" # label of the Y axis
Plot.Blend(Res, titles = Tit, posleg = 2, xlabel = Xlab,
ylabel = Ylab, boxleg = TRUE, color = TRUE,
expcolor = c("goldenrod3","gray53","red2", "blue2"),
casc = TRUE)
Run the code above in your browser using DataLab