GloptiPolyRegion {OptimaRegion} | R Documentation |
Confidence region for optima of higher order polynomial models in multiple factors
Description
Computes and displays an approximated (1 - alpha)*100% confidence region (CR) for the bound-constrained optimum of a fitted polynomial regression model of up to cubic order with up to 5 controllable factors (Del Castillo et al. 2020).
Usage
GloptiPolyRegion(
X,
y,
degree,
lb,
ub,
B = 200,
alpha = 0.05,
maximization = TRUE,
axes_labels = NULL,
outputPDFFile = "CRplot.pdf",
verbose = TRUE,
local_plot = FALSE
)
Arguments
X |
an N*k numeric matrix where N is the number of experiments and k is the number of variables/factors (an integer in [2,5]). X specifies the design matrix |
y |
N*1 numeric vector that specifies the responses |
degree |
integer scalar; degree specifies the order of the polynomial model, which can be 2 or 3 |
lb |
numeric vector of dimension (1, k); lb specifies the lower bounds for the k variables |
ub |
1*k numeric vector that specifies the upper bounds for the k variables |
B |
integer scalar; B specifies the number of bootstrap operations |
alpha |
numeric scalar between 0 and 1; alpha specifies the nominal confidence level, (1 - alpha)*100%, of the confidence region |
maximization |
boolean scalar; specifies whether the algorithm computes the confidence region for a maximum or a minimun |
axes_labels |
vector of strings; specifies the name of each variable or experimental factor to be displayed on the CR plot; the default value is NULL, which sets labels as "x1", "x2", etc. |
outputPDFFile |
name of the PDF file where the CR plot is saved (default: "CR_plot.pdf") |
verbose |
boolean scalar; specifies whether or not to display status of the bootstrapping/optimization iterations |
local_plot |
boolean scalar; specifies whether or to display the confidence region on the screen |
Value
Upon completion, a pdf file with the plot displaying the confidence region of the global optimum projected onto each pairwise-variable planes. If local_plot = TRUE, the plot will also be created on the screen. The function also returns a list consisting of 2 components:
- boot_optima
numeric matrix of dimension ((1 - alpha)*B, k); it contains the (1 - alpha)*B bootstrap optima
- bagged_optimum
numeric vector of dimension (1, k) containing the bagged optimum, computed by taking the column average of boot_optima
Author(s)
Enrique del Castillo exd13@psu.edu, Peng Chen pfc5098@psu.edu, Adam Meyers akm5733@psu.edu, John Hunt J.Hunt@westernsydney.edu.au and James Rapkin jr297@exeter.ac.uk.
References
Del Castillo E, Chen P, Meyers A, Hunt J, Rapkin J (2020). “Confidence regions for the location of response surface optima: the R package OptimaRegion.” Communications in Statistics-Simulation and Computation, 1–21.
Examples
## Not run:
# Example 1: run GloptiPolyRegion on a quadratic, 3 vars example
out <- GloptiPolyRegion(
X = quad_3D[, 1:3], y = quad_3D[, 4], degree = 2,
lb = c(-2, -2, -2), ub = c(2, 2, 2), B = 500, alpha = 0.1,
maximization = TRUE,
outputPDFFile = "CR_quad_3D.pdf", verbose = TRUE
)
# check result
str(out)
# Example 2: run GloptiPolyRegion on a cubic, 5 vars example
out <- GloptiPolyRegion(
X = cubic_5D$design_matrix, y = cubic_5D$response,
degree = 3, lb = rep(0, 5), ub = rep(5, 5), B = 200,
alpha = 0.05, maximization = TRUE,
outputPDFFile = "CR_cubic_5D.pdf", verbose = TRUE
)
# check result
str(out)
## End(Not run)