direct.sum: Form the direct sum of designs.

Description Usage Arguments Details Value Side Effects See Also Examples

View source: R/conf.design.R

Description

Constructs the direct sum of two or more designs. Each plot of one design is matched with every plot of the other. (This might also be called the Cartesian product of two designs).

Usage

1
direct.sum(D1, ..., tiebreak=letters)

Arguments

D1

First component design.

...

Additional component designs, if any.

tiebreak

Series of characters or digits to be used for breaking ties (or repeats) in the variable names in the component designs. Augmented if necessary.

Details

Each plot of one design is matched with every plot of the next, (if any), and so on recursively.

Value

The direct sum of all component designs.

Side Effects

None.

See Also

conf.design

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
### Generate a half replicate of a 2^3 x 3^2 experiment.  The factors are
### to be A, B, C, D, E.  The fractional relation is to be I = ABC and the
### DE effect is to be confounded with blocks.

### First construct the 2^3 design, confounded in two blocks:
d1 <- conf.design(cbind(A = 1, B = 1, C = 1), p = 2)

### Next the 3^2 design, with DE partially confounded in blocks:
d2 <- conf.design(cbind(D = 1, E = 1), p = 3)

### Now extract the principal block from the 2^3 design and form the direct
### sum withthe 3^2 design
dsn <- direct.sum(subset(d1, Blocks == "0"), d2)

### combine block factors into one
dsn <- within(dsn, {
  Blocks <- join(Blocks, Blocksa)
  Blocksa <- NULL
})
head(dsn)

Example output

   Blocks A B C D E
 1    0:0 0 0 0 0 0
 2    0:0 0 0 0 2 1
 3    0:0 0 0 0 1 2
 4    0:1 0 0 0 1 0
 5    0:1 0 0 0 0 1
 6    0:1 0 0 0 2 2

conf.design documentation built on May 2, 2019, 4:02 p.m.