factblocks
generates blocked factorial designs for general factorial treatment structures possibly including
mixtures of qualitative and quantitative level factors. Qualitative level factors are
modelled factorially while quantitative level factors are modelled by polynomials of the required degree.
Designs can be based on any multiple, not necessarily integral, of the complete factorial
treatment design where the fractional part of the design, if any, is chosen by optimizing a
D-optimal fraction of that size for that treatment design.
The treatments
parameter defines the treatment factors of the design and must be a data frame with
a column for each factor and a row for each factorial combination (see examples). The treatment factors
can be any mixture of qualitative or quantitative level factors and the treatment model can be any feasible model defined
by the models
formula of the model.matrix
package (see examples).
Quantitative factors can be modelled either by raw or by orthogonal polynomials. Orthogonal polynomials are numerically more stable
than raw polynomials and are usually the best choice at the design stage. Polynomial models can be fitted at the analysis stage either by raw or
by orthogonal polynomials regardless of the type of polynomial fitted at the design stage.
The replicates
parameter defines the required replication for the treatments design and should be a single number, not necessarily integral,
representing a required multiple or a required fraction of the treatments
data frame. The algorithm will find a
D-optimal or near D-optimal fraction of the required size for any fractional part of replication number, assuming the required design is non-singular.
The rows
parameter, if any, defines the nested row blocks for each level of nesting taken in order from the highest to the lowest. The
first number, if any, is the number of nested row blocks in the first-level of nesting, the second number, if any, is the number of nested row blocks in
the second-level of nesting and so on for any required feasible depth of nesting.
The columns
parameter, if any, defines the nested column blocks for each level of nesting taken in order from the highest to the lowest.
The first number, if any, is the number of nested column blocks in the first-level of nesting, the second, if any, is the number of nested column blocks in
the second-level of nesting and so on for the same required depth of nesting as in the rows
parameter.
The rows
and columns
parameters, if defined, must be of equal length. If a simple set of nested blocks is required for
any particular level of nesting, the number of columns for that level should be set to unity. Any required combination of simple or
crossed blocks can be obtained by appropriate choice of the levels of the rows
and columns
parameters.
If the rows
parameter is defined but the columns
parameter is null, the design will be a simple nested
blocks design with numbers of block levels defined by the rows
parameter. If both the rows
parameter and the columns
parameter are null,
the default block design will be a set of orthogonal main blocks equal in number to the highest common factor of the replication numbers.
Block sizes are always as nearly equal as possible and will never differ by more than a single plot for any particular block classification.
Row blocks and column blocks must always contain at least two plots per block and this restriction will constrain the permitted numbers of
rows and columns in the various nested levels of a block design.
For any particular level of nesting, the algorithm first optimizes the row blocks conditional on any higher-level blocks
and then optimizes the columns blocks, if any, conditional on the rows blocks.
The efficiency factor of a fractional factorial design is the generalized variance of the complete factorial design divided by the generalized variance of
the fractional factorial design where the generalized variance of a design is the (1/p)th power of the determinant of the crossed-product of the p-dimensional
model matrix divided by the number of observations in the design.
Comment:
Row-and-column designs may contain useful treatment information in the individual row-by-column intersection blocks but blocksdesign
does not currently
optimize the efficiency of these blocks.
Row-and-column design with 2 complete treatment replicates, 2 complete rows and 2 complete columns will always confound one treatment contrast in the
rows-by-columns interaction. For these designs, it is impossible to nest a non-singular block design in the rows-by-columns intersections and instead
we suggest a randomized nested blocks design with four incomplete main blocks.
Outputs:
The principle design outputs comprise:
A data frame showing the allocation of treatments to blocks with successive nested strata arranged in standard block order.
A table showing the replication number of each treatment in the design.
An efficiency factor for fractional factorial treatment designs.
A table showing the block levels and the achieved D-efficiency factors for each stratum.