conf.design: Construct symmetric confounded factorial designs.

Description Usage Arguments Details Value Side Effects References See Also Examples

View source: R/conf.design.R

Description

Construct designs with specified treatment contrasts confounded with blocks. All treatment factors must have the sampe (prime) number of levels.

Usage

1
conf.design(G, p, block.name = "Blocks",  treatment.names = NULL)

Arguments

G

Matrix whose rows define the contrasts to be confounded.

The number of columns of G defines the number of factors.

p

The common number of levels for each factor. Must be a prime number.

block.name

Name to be given to the factor defining the blocks of the design.

treatment.names

Name to be given to the treatment factors of the design. If NULL and if G has a dimnames attribute, then dimnames[[2]] is the default, otherwise T1, T2, ...

Details

For example in a 3^4 experiment with AB^2C and BCD confounded with blocks (together with their generalized interactions), the matrix G could be given by

rbind(c(A = 1, B = 2, C = 1, D = 0), c(A = 0, B = 1, C = 1, D = 1))

For this example, p = 3

Having column names for the G matrix implicitly supplies the treatment factor names.

For a single replicate of treatments, blocks are calculated using the confounded contrasts in the standard textbook way. The method is related to that of Collings (1989).

Value

A design with a Blocks factor defining the blocks and treatment factors defining the way treatments are allocated to each plot. (Not in randomised order!)

Side Effects

None.

References

Collings, B. J. (1989) Quick confounding. Technometrics, v31, pp107-110.

See Also

conf.set, direct.sum

Examples

 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
###
### Generate a 3^4 factorial with A B^2 C and B C D confounded with blocks.
###
d34 <- conf.design(rbind(c(A = 1, B = 2, C = 1, D = 0),
                         c(A = 0, B = 1, C = 1, D = 1)), p = 3)
head(d34)
###   Blocks A B C D
### 1     00 0 0 0 0
### 2     00 1 2 1 0
### 3     00 2 1 2 0
### 4     00 2 2 0 1
### 5     00 0 1 1 1
### 6     00 1 0 2 1

as.matrix(replications(~ .^2, d34))
###           [,1]
###  Blocks      9
###  A          27
###  B          27
###  C          27
###  D          27
###  Blocks:A    3
###  Blocks:B    3
###  Blocks:C    3
###  Blocks:D    3
###  A:B         9
###  A:C         9
###  A:D         9
###  B:C         9
###  B:D         9
###  C:D         9

Example output

  Blocks A B C D
1     00 0 0 0 0
2     00 1 2 1 0
3     00 2 1 2 0
4     00 2 2 0 1
5     00 0 1 1 1
6     00 1 0 2 1
         [,1]
Blocks      9
A          27
B          27
C          27
D          27
Blocks:A    3
Blocks:B    3
Blocks:C    3
Blocks:D    3
A:B         9
A:C         9
A:D         9
B:C         9
B:D         9
C:D         9

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