fac.design
that is an experimental
design with all factors at two levels (for mixed-level (
mf
)
designs, one factor can have three levels). The design may be blocked
and have added center points.
design.digest(levels, factor.names=<<see below>>, replic=1, row.names=<<see below>>, fraction=<<see below>>, n.cp=<<see below>>, cp.values=<<see below>>, cp.place=<<see below>>, block.size=<<see below>>, n.blocks=<<see below>>, block.gen=<<see below>>)
"ff0516"
where the
first two characters specify the design type (e.g.,
ff
=fractional factorial,
if
=irregular fractional factorial,
mf
=mixed-level fractional factorial,
pb
=Plackett-Burman design), the next two digits are the number of
experimental factors, the last two digits are the number of runs.
A
,
B
, etc.
If levels are not given, they default to
-
and
+
for two-level
designs and to
-
,
0
, and
+
for three-level designs.
nrows
is the number of observations in the
design.
"mf0412"
).
The default is a complete fraction (1), i.e., a full factorial design is created
factor.names
above). The default is
0
for
each factor if no factor levels are given, otherwise it is
"cp"
.
"first"
,
"last"
,
"ends"
,
"spaced"
,
"random"
. If
the design is blocked the placement occurs within each block.
When
"ends"
is used, half of the center points are placed at
the beginning and half at the end. When
"spaced"
is used, center
points are evenly divided between the beginning, middle, and end of
the design (block). The value of
n.cp
is adjusted if not divisible by
2 or 3, respectively. The default is
"last"
.
block.size
or
n.blocks
is
given, then
design.digest
looks up
block.gen
in a table of blocking
patterns as given by Box, Hunter and Hunter (1978).
"fac.design"
and inherits from
"design"
and
"data.frame"
. It is a data frame, with variables in the frame
corresponding to each of the factors requested in the design. If an
acceptable design name is given or if the arguments generate a design
which can be assigned an acceptable design name, the following
attributes are included in a
fac.design
object:
"ff0516"
);
fac.design
object also has
the attributes giving the number of runs in each block,
block.size
;
the number of blocks,
n.blocks
; and the defining contrast used to
generated the blocks,
block.gen
. If standard blocking was used
(i.e.,
block.gen
was not supplied), then the attribute
conf.tfi
is
T if blocks are confounded with at least one two-factor interactions,
otherwise it is false. A factor
Blocks
is added to the beginning
of the data frame.
n.cp
gives
the total number of center points if the design is not blocked, and
the number of center points per block if the
design is blocked. A factor named
Quad
is added to the end of the
data frame that differentiates between center points and design points.
This factor is not ordinarily printed, see
print.fac.design
.
The designs may be specified in two styles: by design name, as in
Haaland (1989), for example
fac.design("ff0516")
is a 5-factor 16-run
fractional factorial design; second by specifying the
levels, as in
fac.design
, for
example
design.digest(rep(2,5), fraction = 1/2)
gives the same
design as above. Fractional designs may
be created for
2^k
designs. Certain irregular fractional
factorials, mixed-level fractional factorials (with one factor at
three levels), 12-run Plackett-Burman, and 24-run foldover
Plackett-Burman designs may also be generated. Blocking is implemented
as in Box, Hunter and Hunter (1978).
The complete list of legal design names is:
"ff0308"
"ff0408"
"ff0508"
"ff0608"
"ff0708"
"ff0416"
"ff0516"
"ff0616"
"ff0716"
"ff0816"
"ff0916"
"ff1016"
"ff1116"
"ff0532"
"ff0632"
"ff0732"
"ff0832"
"ff0932"
"ff1032"
"ff1132"
"ff0664"
"ff0764"
"ff0864"
"ff0964"
"ff1064"
"ff1164"
"mf0312"
"mf0412"
"mf0512"
"mf0424"
"mf0524"
"if0412"
"if0512"
"if0612"
"if0624"
"pb0712"
"pb0812"
"pb0912"
"pb1012"
"pb1112"
"pb0724"
"pb0824"
"pb0924"
"pb1024"
"pb1124"
These designs are described in the Design Digest appendix to the S+DOX Users'
Manual.
The twelve-run Plackett-Burman designs always have eleven factors,
i.e.
"pb0712"
is generated with seven regular factors plus four dummy
factors that can be used in the analysis to detect possible two-factor
interactions.
The mixed-level fraction designs have one factor
at three levels and are non-orthogonal unless they are full
factorials. The irregular fractions, are also non-orthogonal.
design.digest
chooses defining contrasts for factors so that all
effects have the same standard error,
specifically,
t(x)*(x)=diag(n)
.
Designs are returned in reverse Yates order. If center points are added
or the design is blocked, additional factors
Quad
and
Block
are
added to the data frame, as described above.
To randomize a design use the function
randomize.design
(a
randomized design can restored to standard order by
sort.design
). To
print out
a copy of the design worksheet use the function
worksheet
. Center
points can be added to a design with the function
addcp
. To convert
a dataframe
into an object of class
fac.design
, use the function
as.fac.design
.
To convert a factor to a numeric vector use the function
fac2num
.
To change the factor names use the function
factor.names
. To change
the row names use the function
row.names
.
Avoid using factor names
F
and
T
as these can get confused with
FALSE
and
TRUE
. The default factor names skips these two letters.
Box, G.E.P., Hunter, W.G., and Hunter, J.S. (1978).
Statistics for Experimenters.
New York: Wiley.
Haaland, P. D. (1989).
Experimental Design in Biotechnology.
New York: Marcel Dekker.
# a 1/2 fraction of a 2^5 design buffer.design <- design.digest("ff0516", c("pH", "chelex", "azide", "gent", "thimer")) summary(buffer.design) buffer.rate <-c(6.90, 9.81, 8.78, 7.92, 8.42, 7.04, 7.21, 9.96, 2.34, 1.22, 1.29, 1.73, 1.55, 1.68, 1.81, 1.36 ) buffer.df <- cbind(buffer.design, rate = buffer.rate) # a 1/2 fraction of a 2^5 design in two blocks design.digest("ff0408", n.blocks = 2) # a 2^3 design with 3 center points a.fnames <- list(wash=c(1,3), pH=c(7,9), time=c(5,10), buffer=c("Tris","Tween")) design.digest("ff0408", a.fnames, n.cp=3, cp.values = c("2","8","7.5","BSA")) # various options for blocking and center points design.digest("ff0416", n.blocks=2, n.cp=2, cp.place="ends") design.digest("ff0416", n.blocks=4, n.cp=1) design.digest("ff0416", n.blocks=2, n.cp=3, cp.place="spaced") # Placket-Burman design design.digest("pb1112")