mood {MOODE} | R Documentation |
Setting up the parameters of a factorial experiment to search for multi-objective optimal completely randomised design.
Description
Creates an object containing the parameters of the experiment, compound optimality criterion with the weights and parameters of the search.
Usage
mood(
K,
Levels,
Nruns,
criterion.choice = c("GD", "GL", "GDP", "GLP", "MSE.D", "MSE.L", "MSE.P"),
kappa = list(),
control = list(),
prob = list(),
model_terms = list(primary.model = "first_order")
)
Arguments
K |
Number of factors. |
Levels |
Either (a) a common number of levels for each factor or (b) a list of length K of the vectors containing levels of each factor. |
Nruns |
Number of runs of the experiment. |
criterion.choice |
Compound criterion to be used for the optimal design search or evaluation. Possible values are:
|
kappa |
List specifying the weights used in the compound criterion. Each named entry must be between 0 and 1.
|
control |
Named list specifying control parameters for the design search.
|
prob |
Named list specifying confidence levels for DP- ( |
model_terms |
A list specifying the primary (fitted) and potential (biased) models with the following named elements (see Details).
|
Details
The function provides different ways of specifying the levels of the factors and the models. Although some default options are provided
for, e.g., criterion.choice
and kappa.*
values, specification of these input parameters should be carefully chosen to reflect the aims of the experiment and available prior information.
Specifying the factors and levels
If all K
factors have the same number of levels, Levels
parameter is used to input that number.
Otherwise, Levels
is set to be a list of vectors containing the values of the factors, e.g.
list(1:3, 1:2, 1:4)
for 3 factors with equally spaced 3, 2
and 4
levels respectively.
Specifying the fitted model and the potential terms
There are two ways to describe the primary and potential sets of model terms via the model_terms
list.
Named elements primary.model
and potential.model
can be used to specify the fitted model and the potential terms via a string form.
They are used to generate the sets of primary.terms
and potential.terms
which alternatively can be input directly.
Possible values of primary.model
are:
-
main_effects
– main effects for all the factors (default for all criteria) -
first_order
– main effects and linear interactions -
second_order
– full second order polynomial -
third_order
– full second order polynomial model and all interactions of degree 3 -
cubic
– third order polynomial model with cubic terms
The intercept is always included as a primary term.
Possible elements of the potential.model
vector argument:
-
linear_interactions
– linear interactions among the factors (default for MSE criteria) -
quadratic_terms
– quadratic terms for all the factors -
third_order_terms
– all interactions of degree 3: linear-by-linear-by-linear and quadratic-by-linear terms -
cubic_terms
– cubic terms for all the factors -
fourth_order_terms
– all interactions of degree 4, similar tothird_order_terms
primary.terms
and potential.terms
arguments are used to specify the fitted model and the potential terms explicitly – up to the total power of 4.
Single factor powers, are coded as a string starting with with "x" and followed by the index of the factor and the power:
"x32"
. For example,x_3^2
is coded as"x32"
;"x22"
stands forx_2^2
, and"x4"
stands for the linear termx_4
.Interaction of factors' powers are coded by merging the individual factors' powers, ordered by the factors' indexes. For example,
x_2^2\times x_1
is coded as"x1x22"
,x_3x_12x_4
– as"x12x3x4"
.
Value
List of parameters of the experiment, compound criterion of choice, and primary and potential model terms.
-
K
Number of factors. -
Klev
Number of levels of each factor, if all factors have the same number of levels. -
Levels
List of length K of the vectors containing values of the factors. -
Nruns
Number of runs of the experiment. -
criterion.choice
Compound criterion to be used for the optimal design search or evaluation. -
Nstarts
The number of randomly generated start designs of the search algorithm. -
Biter
Number of samples for evaluating the MSE determinant-based component criterion. -
tau2
The variance scaling parameter for the prior distribution of the potential terms. -
tau
The square root oftau2
-
Cubic
Whether the experimental region is cubic (TRUE
) or spherical (FALSE
). -
MC
Indicator of the multiple comparison (Bonferroni) correction for trace-based criteria. -
prob.DP, prob.LP, prob.LoF, prob.LoFL
Confidence levels for the DP-, LP-, lack of fit determinant- and trace-based criteria. -
alpha.DP, alpha.LP, alpha.LoF, alpha.LoFL
Significance levels for the DP-, LP-, lack of fit determinant- and trace-based criteria. -
orth
Whether the candidate sets are orthonormalised (TRUE
) or not (FALSE
). -
Z0
Z0 matrix. -
W
Weight matrix for Ls criterion. -
primary.terms
Fitted (primary) model terms. -
potential.terms
Potential terms. -
P
The number of terms in the fitted model (including intercept). -
Q
The number of potential terms. -
kappa.Ds, kappa.DP, kappa.L, kappa.LP, kappa.LoF, kappa.bias, kappa.mse
Compound criterion weights. -
warning.msg
Warning messages.
References
Gilmour SG, Trinca LA (2012).
“Optimum Design of Experiments for Statistical Inference (with discussion).”
Journal of the Royal Statistical Society C, 61, 345-401.
Goos P, Kobilinsky A, O'Brien TE, Vandebroek M (2005).
“Model-Robust and Model-Sensitive Designs.”
Computational Statistics and Data Analysis, 49, 201-216.
Examples
example1 <- mood(K = 5, Levels = 3, Nruns = 40, criterion.choice = "GDP",
kappa = list(kappa.Ds = 1./3, kappa.DP = 1./3, kappa.LoF = 1./3),
control = list(Nstarts = 50, tau2 = 0.1),
model_terms = list(primary.model = "second_order",
potential.terms = c("x12x2", "x22x3", "x32x4", "x42x5")))
example1
example2 <- mood(K = 3, Nruns = 12, Levels = list(1:3, 1:2, 1:2), criterion.choice = "MSE.L",
kappa = list(kappa.LP = 1./2, kappa.LoF = 1./4, kappa.mse = 1./4),
control = list(Nstarts = 50, tau2 = 1),
model_terms = list(primary.terms = "first_order",
potential.terms = c("x12", "x12x2", "x12x3")))
example2