planor-package: Generation of Regular Factorial Designs

Description Details Note Author(s) References Examples

Description

A package dedicated to the automatic generation of regular factorial designs, including fractional designs, orthogonal block designs, row-column designs and split-plots.

Details

The user describes the factors to be controlled in the experiment and the anova model to be used when the results will be analysed. He or she also specifies the size of the design, that is, the number of available experimental units. Then planor looks for a design satisfying these specifications and possibly randomizes it. The core of the algorithm is the search for the key matrix, an integer matrix which determines the aliasing in the resulting factorial design.

The user may use the function regular.design where all these steps are integrated, and transparent by default. Alternatively, the steps can be decomposed by using successively the functions planor.factors, planor.model, planor.designkey and planor.design. For the expert user, the function planor.designkey can give several key matrix solutions. Alias and summary methods allow to study and compare these solutions, in order to select the most appropriate one for the final design.

Note

An R option named planor.max.print is set. It is equal to the number of printed rows and columns in the display of planor matrices. Default is 20. You can change its value by using the function options() (see ?options).

Author(s)

Monod, H. herve.monod@inrae.fr and Bouvier, A. and Kobilinsky, A.

References

See citation("planor").

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
# DESIGN SPECIFICATIONS
# Treatments: four 3-level factors A, B, C, D
# Units: 27 in 3 blocks of size 9
# Non-negligible factorial terms:
#   block + A + B + C + D + A:B + A:C + A:D + B:C + B:D + C:D
# Factorial terms to estimate:
#   A + B + C + D
# 1. DIRECT GENERATION, USING regular.design
mydesign <- regular.design(factors=c("block", LETTERS[1:4]),
  nlevels=rep(3,5), model=~block+(A+B+C+D)^2, estimate=~A+B+C+D,
  nunits=3^3, randomize=~block/UNITS)
print(mydesign)
# DUMMY ANALYSIS
# Here we omit two-factor interactions from the model, so they are 
# confounded with the residuals (but not with ABCD main effects)
set.seed(123)
mydesigndata <- mydesign@design
mydesigndata$Y <- runif(27)
mydesign.aov <- aov(Y ~ block + A + B + C + D, data=mydesigndata)
summary(mydesign.aov)
# 2. STEP-BY-STEP GENERATION, USING planor.designkey
F0 <- planor.factors(factors=c( "block", LETTERS[1:4]), nlevels=rep(3,5),
  block=~block)
M0 <- planor.model(model=~block+(A+B+C+D)^2, estimate=~A+B+C+D) 
K0 <- planor.designkey(factors=F0, model=M0, nunits=3^3, max.sol=2)
summary(K0)
mydesign.S4 <- planor.design(key=K0, select=2)

Example output

Loaded planor 1.3.7

The search is closed: max.sol = 1 solution(s) found 
An object of class "planordesign"
Slot "design":
   block A B C D
1      1 3 2 3 2
2      1 3 2 2 1
3      1 1 3 1 3
4      1 1 3 3 2
5      1 1 3 2 1
6      1 2 1 3 2
7      1 2 1 2 1
8      1 3 2 1 3
9      1 2 1 1 3
10     2 1 1 1 1
11     2 3 3 3 3
12     2 2 2 2 2
13     2 3 3 1 1
14     2 3 3 2 2
15     2 2 2 3 3
16     2 1 1 3 3
17     2 1 1 2 2
18     2 2 2 1 1
19     3 2 3 3 1
20     3 3 1 3 1
21     3 2 3 2 3
22     3 3 1 1 2
23     3 3 1 2 3
24     3 1 2 1 2
25     3 2 3 1 2
26     3 1 2 2 3
27     3 1 2 3 1

Slot "factors":
An object of class "designfactors"
Slot "fact.info":
      nlev block ordered model basic dummy
block    3 FALSE   FALSE  TRUE FALSE FALSE
A        3 FALSE   FALSE  TRUE FALSE FALSE
B        3 FALSE   FALSE  TRUE FALSE FALSE
C        3 FALSE   FALSE  TRUE FALSE FALSE
D        3 FALSE   FALSE  TRUE FALSE FALSE

Slot "pseudo.info":
      parent nlev block ordered model basic dummy
block      1    3 FALSE   FALSE  TRUE FALSE FALSE
A          2    3 FALSE   FALSE  TRUE FALSE FALSE
B          3    3 FALSE   FALSE  TRUE FALSE FALSE
C          4    3 FALSE   FALSE  TRUE FALSE FALSE
D          5    3 FALSE   FALSE  TRUE FALSE FALSE

Slot "levels":
$block
[1] 1 2 3

$A
[1] 1 2 3

$B
[1] 1 2 3

$C
[1] 1 2 3

$D
[1] 1 2 3



Slot "model":
list()

Slot "designkey":
[[1]]
An object of class keymatrix

********** Prime  3  design **********

    block A B C D
*U*     1 0 1 0 1
*U*     0 1 1 0 0
*U*     0 0 0 1 1



Slot "nunits":
[1] 27

Slot "recursive":
[1] FALSE

            Df Sum Sq Mean Sq F value Pr(>F)  
block        2 0.2227 0.11136   1.540  0.245  
A            2 0.5385 0.26924   3.724  0.047 *
B            2 0.1471 0.07354   1.017  0.384  
C            2 0.0325 0.01627   0.225  0.801  
D            2 0.0851 0.04256   0.589  0.567  
Residuals   16 1.1569 0.07230                 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Preliminary step 1 : processing the model specifications
Preliminary step 2 : performing prime decompositions on the factors
*** Main step for prime p = 3 : key-matrix search
  => search for columns 2 to 5 
      first visit to column 2
      first visit to column 3
    ---    col. 3 ( j = 2) 22 selected candidates
      first visit to column 4
    ---    col. 4 ( j = 3) 18 selected candidates
      first visit to column 5
    ---    col. 5 ( j = 4) 8 selected candidates
The search is closed: max.sol = 2 solution(s) found 

********** Prime  3  design **********

--- Solution  1  for prime  3  ---

TREATMENT EFFECTS CONFOUNDED WITH THE MEAN
1 = A B^2  C^2  D

BLOCK-and-TREATMENT EFFECTS CONFOUNDED WITH THE MEAN
1 = block^2  A^2  B
1 = block^2  C^2  D
1 = block A^2  B C^2  D

WEIGHT PROFILES
Treatment effects confounded with the mean: 4^1 
Treatment effects confounded with block effects: 2^2 4^1 
Treatment pseudo-effects confounded with the mean: 4^1 
Treatment pseudo-effects confounded with block effects: 2^2 4^1 

--- Solution  2  for prime  3  ---

TREATMENT EFFECTS CONFOUNDED WITH THE MEAN
1 = A^2  B C^2  D

BLOCK-and-TREATMENT EFFECTS CONFOUNDED WITH THE MEAN
1 = block^2  A^2  B
1 = block C^2  D
1 = block^2  A B^2  C^2  D

WEIGHT PROFILES
Treatment effects confounded with the mean: 4^1 
Treatment effects confounded with block effects: 2^2 4^1 
Treatment pseudo-effects confounded with the mean: 4^1 
Treatment pseudo-effects confounded with block effects: 2^2 4^1 

planor documentation built on March 19, 2020, 1:06 a.m.