The option estimable
allows to specify 2-factor interactions (2fis) that
have to be estimable in the model. Whenever a resolution V or higher design is available,
this option is unnecessary, because all 2fis are estimable in the sense that they are
not aliased with any main effect or any other 2fi. If resolution V or higher is not affordable,
the option estimable
can ensure that certain 2fis can nevertheless be estimated.
Per default, it is assumed that a resolution IV design is required,
as it is normally not reasonable to allow main effects to be
aliased with other 2-factor interactions in this situation. There are two types of
estimability that are distinguished by the setting of option clear
in
function FrF2
(cf. Groemping 2010).
Let us first consider designs of at least resolution IV.
With option clear=TRUE
, FrF2
searches for
a model for which all main effects and all 2fis given in estimable
are
clear of aliasing with any other 2fis. This is a weaker requirement than resolution V,
because 2fis outside those specified in estimable
may be aliased with
each other. But it is much stronger than what is done in case of clear=FALSE
:
For the latter, FrF2
searches for a design that has a distinct column in
the model matrix for each main effect and each interaction requested
in estimable
.
Users can explicitly permit that resolution III designs are included in the
search of designs for which the specified 2fis are estimable (by the res3=TRUE
option).
In case of clear=TRUE
, this leads to the somewhat
strange situation that main effects can be aliased with 2fis from outside
estimable
while 2fis from inside estimable
are not aliased with
any main effects or 2fis.
With clear=TRUE
, the algorithm compares the requirement set to
catalogued sets of clear 2fis by a graph isomorphism algorithm from R-package
igraph. For details of this algorithm,
cf. Groemping (2012). With the catalogue catlg
available in this package,
the best (minimum aberration) existing clear designs are guaranteed to be found
for up to 64 runs and have a good chance to be found for 128 runs. For 128 runs,
it is possible to load an additional large catalogue (package FrF2.catlg128)
in order to also guarantee that the best clear design is found. For 256 and 512 runs,
only one or two resolution IV designs of each size are catalogued so that
option estimable
can try to influence allocation of factors to columns,
but may fail although an appropriate clear design would exist outside the catalogued
designs.
The search for a clear design
is often fast. If it isn't, option sort
of function FrF2
can help. For the occasional situation where
this doesn't help either, a manual search may help, see CIG
for an example of how to proceed.
Since version 2 of package FrF2, requesting 2fis to be clear is compatible
with blocking a design. The algorithm behind that functionality is based on
Godolphin (2019) and is described in Groemping (2019).
The default implementation strives for a guartanteed and best possible result.
Arguments firsthit
and useV
to function FrF2
can be used for trying to obtain a possibly not best result (firsthit
)
faster or to use a (sometimes) faster algorithm that is not guaranteed
to deliver a result even though it might exist for resolution IV situations
(useV=FALSE
).
With clear=FALSE
, the algorithm loops through the eligible designs from
catlg.select
from good to worse (in terms of MA) and, for each design, loops
through all eligible permutations of the experiment factors from perms
.
If perms
is omitted, the permutations are looped through in lexicographic
order starting from 1:nfac or perm.start
. Especially in this case,
run times of the search algorithm can be very long.
The max.time
option allows to limit this run time.
If the time limit is reached, the final situation (catalogued design and
current permutation of experiment factors) is printed so that the user can
decide to proceed later with this starting point (indicated by catlg.select
for the catalogued design(s) to be used and perm.start
for the current
permutation of experiment factors).
With clear=TRUE
, the algorithm loops through the eligible designs from
catlg.select
from good to worse (in terms of MA) and, for each design,
uses a subgraph isomorphism check from package igraph
. There are two such
algorithms, VF2 (the default, Cordella et al. 2001) and LAD (introduced with
version 1.7 of package FrF2, Solnon 2010),
which can be chosen with the method
option.
Run times of the subgraph isomorphism search are often fast,
but can also be very very slow in unlucky situations.
Where the VF2 algorithm is particularly slow, the LAD algorithm is often fast
(see Groemping 2014b).
Especially for the VF2 algorithm, run times may strongly depend on the ordering
of factors, which can be influenced by the option sort
.
As the slowness of the process is intrinsic to the subgraph isomorphism
search problem (which is NP-complete), a max.time
option analogous to
the clear=FALSE
situation would be of very limited use only and is
therefore not available. Instead, it is possible to have a look at the
number of the design that was in the process of being searched when the
process was interrupted (with the command FrF2.currentlychecked()
).
Note that - according to the structure of the catalogued designs and the lexicographic
order of checking permutations - the initial order of the factors has a strong influence
on the run time for larger or unlucky problems. For example, consider
an experiment in 32~runs and 11~factors, for six of which the pairwise interactions are to be estimable
(Example 1 in Wu and Chen 1992). estimable
for this model can be specified as
formula("~(F+G+H+J+K+L)^2")
OR
formula("~(A+B+C+D+E+F)^2")
.
The former runs a lot faster than the latter (I have not yet seen the latter finish
the first catalogued design, if perms
is not specified).
The reason is that the latter needs more permutations of the experiment factors than
the former, since the factors with high positions
change place faster and more often than those with low positions.
For this particular design, it is very advisable to constrain the
permutations of the experiment factors to the different subset selections of six factors
from eleven, since permutations within the sets do not change the possibility of accomodating
a design. The required permutations for the second version of this example
can be obtained e.g. by the following code:
perms.6 <- combn(11,6)
perms.full <- matrix(NA,ncol(perms.6),11)
for (i in 1:ncol(perms.6))
perms.full[i,] <- c(perms.6[,i],setdiff(1:11,perms.6[,i]))
Handing perms.full to the procedure using the perms
option makes the second version of the
requested interaction terms fast as well, since up to almost 40 Mio permutations of experiment
factors are reduced to at most 462. Thus, whenever possible,
one should try to limit the permutations necessary in case of clear=FALSE
.
In order to support relatively comfortable creation of distinct designs of some frequently-used types
of required interaction patterns, the function compromise
has been
divised: it supports creation of the so-called compromise plans of classes 1 to 4 (cf.
e.g. Addelman 1962; Ke, Tang and Wu 2005; Groemping 2012).
The list it returns also contains a component perms.full
that can be used as input
for the perms
option.
Please contact me with any suggestions for improvements.