
Last chance! 50% off unlimited learning
Sale ends in
Creates the matrix of all candidate regressors for a factor regression model on a cuboid grid (up to 9 factors).
Fx_cube(formula, lower=NULL, upper=NULL, n.levels=NULL, echo=TRUE)
The n
times m
matrix of all candidate regressors for a factor regression model on a cuboid grid. The rows of Fx
are the regressors f(x)
for all candidate design points x
.
the formula of the model. The rules for creating the formula are standard for R but: 1) the formula must not contain the dependent variable (it is one-sided); 2) the d
factors (variables) must be labeled x1,x2,x3,
...
the d
-dimensional vector of the smallest values of factors. If lower=NULL
, the program sets lower <- rep(-1, d)
.
the d
-dimensional vector of the largest values of factors. If upper=NULL
, the program sets upper <- rep(1, d)
.
the d
-dimensional vector of the numbers of levels of each factor. If n.levels=NULL
, the program sets n.levels <- rep(2, d)
.
Print the call of the function?
Radoslav Harman, Lenka Filova
Fx_simplex, Fx_blocks, Fx_glm, Fx_survival, Fx_dose
if (FALSE) {
# The Fx for the cubic model on a discretized interval
Fx <- Fx_cube(~x1 + I(x1^2) + I(x1^3), lower=0, upper=2, n.levels=101)
# The D-optimal design of size 20
w <- od_KL(Fx, 20, t.max=5)$w.best
od_plot(Fx, w, Fx[, 2])
# The Fx for the full quadratic response surface model on a non-convex region
Fx <- Fx_cube(~x1 + x2 + I(x1^2) + I(x2^2) + I(x1*x2), n.levels=c(51, 51))
keep <- rep(TRUE, nrow(Fx))
for(i in 1:nrow(Fx)) if(prod(abs(Fx[i, 2:3])) > 0.2) keep[i] <- FALSE
Fx <- Fx[keep, ]
# The D-optimal design of size 29 without replications
w <- od_KL(Fx, 29, bin=TRUE, t.max=5)$w.best
od_plot(Fx, w, Fx[, 2:3])
# The Fx for the chemical weighing with 3 items and a bias term
Fx <- Fx_cube(~x1 + x2 + x3, n.levels=c(3, 3, 3))
# The D-optimal design of size 12
w <- od_KL(Fx, 12, t.max=2)$w.best
od_plot(Fx, w, Fx[, 2:4])
}
Run the code above in your browser using DataLab