Title: | Joint Analysis of Experiments with Mixtures and Random Effects |
---|---|
Description: | Performs a joint analysis of experiments with mixtures and random effects, taking on a process variable represented by a covariable. |
Authors: | Paulo Cesar Ossani [aut, cre] , Marcelo Angelo Cirillo [aut] |
Maintainer: | Paulo Cesar Ossani <[email protected]> |
License: | GPL-3 |
Version: | 1.0.5 |
Built: | 2024-11-21 06:38:47 UTC |
Source: | CRAN |
Joint analysis of experiments with mixtures and random effects, taking on a process variable represented by a covariable.
Package: | Blendstat |
Type: | Package |
Version: | 1.0.5 |
Date: | 2024-06-21 |
License: | GPL(>= 2) |
LazyLoad: | yes |
Marcelo Angelo Cirillo and Paulo Cesar Ossani.
Maintainer: Paulo Cesar Ossani <[email protected]>
Kalirajan, K. P. On the estimation of a regression model with fixed and random coefficients. Journal of Applied Statistics, 17(2): 237-244, 1990. doi:10.1080/757582835
Swany, P. A. V. B. Statistical Inference in Random Coefficient Regression Models. Amsterdam: Springer Science & Business Media, 1971. 209 p.
Joint analysis of experiments with mixtures and random effects, taking on a process variable represented by a covariable.
Blend(exp, X, Y, conc = NULL, effects = NULL)
Blend(exp, X, Y, conc = NULL, effects = NULL)
exp |
Vector with the names of the experiments. |
X |
Mixture variables (components), without the vector of the concentrations (covariable). |
Y |
Response variable. |
conc |
Vector with the concentrations (covariable) of the experiments. |
effects |
Vector of the effects of the mixtures in a reference mixture (example: centroid). |
MPred |
Matrix with the predicted and observed values. |
MCPred |
Matrix with the values predicted by components. |
Mexp |
Matrix with the design of the experiments. |
theta |
Vector with the theta estimates. |
Marcelo Angelo Cirillo
Paulo Cesar Ossani
Kalirajan, K. P. On the estimation of a regression model with fixed and random coefficients. Journal of Applied Statistics, 17(2): 237-244, 1990. doi:10.1080/757582835
Swany, P. A. V. B. Statistical Inference in Random Coefficient Regression Models. Amsterdam: Springer Science & Business Media, 1971. 209 p.
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)
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)
Database of coffee blends of different varieties processed via wet (peeled cherry).
data(DataCD)
data(DataCD)
Database of coffee blends of different varieties processed via wet (peeled cherry). Formed by the variables: Exp (code of the experiments); CEB (specialty Bourbon Yellow coffee produced at an altitude above 1,200m); CT (roasted commercial coffee); CC (Conillon coffee); CEA (Acaia specialty coffee produced at altitude below 1,100m); Conc (concentrations at 7% and 10% (m/v) of roasted and ground coffee beans in 100 ml of water). Response variables defined by the sensorial attributes: Body, Taste, Acidity, Bitterness, Score.
Project yield and research entitled by "Quality of blends of specialty and non-specialty coffees of the region of the Mantiqueira Mountains - treatment of discrepant scores in tests with consumers". CNPq for their aid via grant number 304974/2015-3.
data(DataCD) # dataset Exp <- DataCD[,2] # identification of the experiments X <- DataCD[,3:6] # independent variables (components) Y <- DataCD[,11] # dependent variable (response Bitterness) # effects o the mixtures in the 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(DataCD[,7]) # covariable (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
data(DataCD) # dataset Exp <- DataCD[,2] # identification of the experiments X <- DataCD[,3:6] # independent variables (components) Y <- DataCD[,11] # dependent variable (response Bitterness) # effects o the mixtures in the 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(DataCD[,7]) # covariable (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
Database of coffee blends of different varieties processed by dry via.
data(DataNAT)
data(DataNAT)
Database of coffee blends of different varieties processed by dry via. Formed by the variables: Exp (code of the experiments); CEB (specialty Bourbon Yellow coffee produced at an altitude above 1,200m); CT (roasted commercial coffee); CC (Conillon coffee); CEA (Acaia specialty coffee produced at altitude below 1,100m); Conc (concentrations at 7% and 10% (w/v) of roasted and ground coffee beans in 100 ml of water). Variable responses defined by sensory attributes: Body, Taste, Acidity, Bitterness, Score.
Project yield and research entitled by "Quality of blends of specialty and non-specialty coffees of the region of the Mantiqueira Mountains - treatment of discrepant scores in tests with consumers". CNPq for their aid via grant number 304974/2015-3.
data(DataNAT) # dataset Exp <- DataNAT[,2] # identification of the experiments X <- DataNAT[,3:6] # independent variables (components) Y <- DataNAT[,11] # dependent variable (response Bitterness) # effects o the mixtures in the 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]) # covariable (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
data(DataNAT) # dataset Exp <- DataNAT[,2] # identification of the experiments X <- DataNAT[,3:6] # independent variables (components) Y <- DataNAT[,11] # dependent variable (response Bitterness) # effects o the mixtures in the 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]) # covariable (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
Plots of the results of the joint analysis of the experiments.
Plot.Blend(BL, titles = c(NA,NA), posleg = 2, xlabel = NA, ylabel = NA, boxleg = FALSE, color = TRUE, expcolor = NA, casc = TRUE)
Plot.Blend(BL, titles = c(NA,NA), posleg = 2, xlabel = NA, ylabel = NA, boxleg = FALSE, color = TRUE, expcolor = NA, casc = TRUE)
BL |
Data of the Blend function. |
titles |
Titles for the plot of the effects of the concentrations and components. If it is not defined, it assumes the default text. |
posleg |
1 for caption in the left upper corner, |
xlabel |
Names the X axis, if not set, assumes the default text. |
ylabel |
Names the Y axis, if not set, assumes the default text. |
boxleg |
Puts frame on the caption (default = TRUE). |
color |
Colorful plots (default = TRUE). |
expcolor |
Vector with the colors of the experiments. |
casc |
Cascade effect in the presentation of the plots (default = TRUE). |
Return several plots.
Marcelo Angelo Cirillo
Paulo Cesar Ossani
data(DataCD) # dataset Exp <- DataCD[,2] # identification of the experiments X <- DataCD[,3:6] # independent variables (components) Y <- DataCD[,11] # dependent variable (response Bitterness) # effects o the mixtures in the 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(DataCD[,7]) # covariable (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("Covariable (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)
data(DataCD) # dataset Exp <- DataCD[,2] # identification of the experiments X <- DataCD[,3:6] # independent variables (components) Y <- DataCD[,11] # dependent variable (response Bitterness) # effects o the mixtures in the 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(DataCD[,7]) # covariable (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("Covariable (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)