Description Usage Arguments Details Value Author(s) References See Also Examples
Function colpick handles the creation of X matrices for blocking, function FF_from_X blocks a full factorial, function X_from_profile creates an X matrix from a profile, function phimax calculations the maximum number of clear 2fis from Godolphin's approach. Further helper functions support the use of the method. The functions are meant for expert users only.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  colpick(design, q, all = FALSE, select.catlg = catlg,
estimable = NULL, method = "VF2", sort = "natural",
res3 = FALSE, all0 = FALSE, quiet = FALSE,
firsthit = is.numeric(design))
FF_from_X(X, randomize = TRUE, seed = NULL, alias.info=2)
X_from_profile(n, q, profile = NULL)
clear2fis_from_profile(n, q, profile = NULL)
X_from_parts(n, q, parts)
phimax(n, q, profile = NULL)
blockgencreate(X, p = 0)
Xcalc(XI, gen)
blockgengroup(X, p = 0, num = FALSE)
colpickIV(design, q, all = FALSE, select.catlg = catlg,
estimable = NULL, method = "VF2", sort = "natural",
res3 = FALSE, all0 = FALSE, quiet = FALSE,
firsthit = is.numeric(design))

design 
a character string that identifies a design in the cataloge specified
by option 
q 
the requested block size is 2^q 
all 
if TRUE (default FALSE), all possible X matrices are returned;
otherwise, 
select.catlg 
name of catalogue (not in quotes);
only relevant, if 
estimable 
a specification of 2fis to be kept clear in the blocked design, either as a character vector of pairs of factor letters (using the first elements of 'Letters') or as a tworow matrix of pairs of factor numbers occurring in 2fis) 
method 
character string identifying a subgraph isomorphism method
(VF2 or LAD), see 
sort 
character string specifying a presort strategy for subgraph
isomorphism search, see 
res3 
relevant only if 
all0 
per default ( 
quiet 
if TRUE, the message about failure is suppressed (for using the function
inside other functions, like 
firsthit 
if TRUE, the function does not attempt to optimize the
number of clear 2fis but accepts the first acceptable blocking
(relevant for nonnull 
X 
a q times n X matrix with only 0/1 elements for block construction 
randomize 
logical. If TRUE, the design is randomized. This is the default.
Randomization is implemented using function

seed 
optional seed for the randomization process 
alias.info 
degree of effects aliased with blocks to be included in the

profile 
profile to use for calculation (NULL or integer vector of up to 2^q1 elements that sum to n); if NULL, the maximally balanced profile is used (which yields the overall maximum number of clear 2fis when blocking a full factorial) 
parts 
list that provides factor partitions; list entries
must either be all integers from 1 to 
n 
number of factors 
p 
the number of generated factors (among the n factors); 2^(np) is the number of runs in the experiment) 
XI 
a q times k X_I matrix
with only 0/1 elements,
to be extended into a q times n X matrix for
block construction, given the generators in 
gen 
generators for extending 
num 
if TRUE (default FALSE), Yates column numbers are returned instead of their character representations 
These are the functions for the Godolphin (2019) approach to blocking; most of them are uservisible. This approach and its implementation are described in Groemping (2019). Direct use of this functions is intended for expert use only.
Function colpick
is
the main workhorse function for blocking larger situations
in function FrF2
(since version 2 of the package, it replaces the earlier approach
with function blockpick.big
); it makes use of function
blockgencreate
, and of the internal function blockgengroup
.
Function FF_from_X
creates a class design
object.
Design size is limited by computer memory and run time.
The function can use an X matrix that was produced by function
colpick
; but note that it is quite easy to handcraft
an X matrix for a full factorial, even with estimability requirements.
The lightweight function does not have arguments for customization; it can
be postprocessed, however, e.g. using function
factor.names<
.
Function X_from_profile
creates an X matrix that corresponds to
the specified profile.
Function phimax
returns the maximum number of 2fis that can
be kept clear when blocking a full factorial design in n factors into
blocks of size 2^q, given the specified profile.
Function blockgencreate
creates block generators from an X matrix
for blocking a design in 2^(np)=2^k runs into blocks of size 2^q,
where n and q are derived from X
as the number of columns and rows,
respectively. The generators are returned as a character vector that consists of
strings of base factor letters.
Function Xcalc
extends a q times k
matrix X_I by p=nk columns
(X_II in Godolphin notatation) based
on the generators provided in gen
.
Function blockgengroup
is internal only,
as are functions colpickIV
and clear2fis_from_profile
.
Function colpick
returns a list of at least two elements:
if all
is FALSE, the list consists of the matrix X
,
the character vector
clear.2fis
and possibly the integer vector map
,
otherwise of listvalued elements X_matrices
, clearlist
and
profiles
and maplist
.
Function FF_from_X
returns a class design object of type FrF2.blocked
.
Function phimax
returns a real number.
Function blockgencreate
returns a character vector of generators
in terms of Letters
combinations of the first $np$ factors.
Function Xcalc
returns a \code{q} times \code{n}
matrix (in case of a single generator) or a list of such matrices
(if gen
is a class catlg
object with more than one element).
The internal function blockgengroup
returns a character vector of all effects
(denoted as base column letter combinations) aliased with the block main effect,
or corresponding Yates column numbers.
The internal function colpickIV
returns almost the same type of results as colpick
.
The difference:
if all
is TRUE, there is an integer vector map
instead of the
maplist
element, because the map
does not depend on the choice of Xmatrix
(separate subgraph isomorphism checking is skipped with this function).
Ulrike Groemping
Groemping, U. (2010). Creating clear designs: a graphbased algorithm and a catalogue of clear compromise plans. Reports in Mathematics, Physics and Chemistry, Report 05/2010, Department II, Beuth University of Applied Sciences Berlin. (Preprint for IIE Transactions; IIE Transactions is available at http://www.tandfonline.com.)
Godolphin, J. (2019). Construction of Blocked Factorial Designs to Estimate Main Effects and Selected TwoFactor Interactions. *Unpublished report* available at https://arxiv.org/abs/1907.02373.
Groemping, U. (2019). An algorithm for blocking regular fractional factorial 2level designs with clear twofactor interactions. Reports in Mathematics, Physics and Chemistry, Report 3/2019, Department II, Beuth University of Applied Sciences Berlin.
plot.igraph
, tkplot
,
plot.common
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43  phimax(7, 2) ## 16 2fis can be clear, if 128 run full factorial is blocked
## into 32 blocks of size 2^2=4
## X matrices for blocking full factorials
## do not care about which factors have which role
X_from_profile(7, 2, c(3,2,2))
# X_from_profile(7, 2, c(2,2,3)) returns same matrix
## ensure specific partition, i.e. specific requirement CIG to be accommodated
X < X_from_parts(7, 2, parts=list(c("A","D","F"), c("B","G"), c("C","E")))
## blocked full factorial
summary(FF_from_X(X))
## using colpick
## estimable in standard letters
requ < c("BA", "BC", "BD", "BE", "BF", "BG", "BH", "BJ")
## estimability requirement in factor names
fn < Letters[15:23] ## P to X
requfn < requ
requfn < sapply(1:8, function(obj) gsub(Letters[obj], fn[obj], requfn[obj]))
## obtain X matrix for accommodating estimability requirement in 94.2
(aus < colpick("94.2", 2, estimable=requ))
## obtain the same matrix manually with Xcalc
XI < aus$X[,1:5]
## obtain the same matrix manually with Xcalc
all(Xcalc(XI, catlg["94.2"])==aus$X)
## inspect X matrices generated from XI
Xcalc(XI, catlg[nruns(catlg)==32 & nfac(catlg)==9 & res(catlg)>=4])
## factor permutation needed
aus$map
## calculate block generators
blockgencreate(aus$X, p=4)
## automatic creation from the design 94.2 uses these block generators
summary(FrF2(32, 9, blocks=8, estimable=requ, factor.names=fn,
alias.block.2fis = TRUE, select.catlg = catlg["94.2"]),
brief=TRUE)
## can also be reproduced manually (internal function invperm does the permuting)
summary(FrF2(design="94.2", blocks=blockgencreate(aus$X, p=4),
factor.names=fn[FrF2:::invperm(aus$map)],
alias.block.2fis = TRUE),
brief=TRUE)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.