Chapter 49 Fractional Factorial Topics

49.1 Blocking

FrF2() will block for you as well.

> library(FrF2)

Here we ask for a \(2^{6-2}\) (16 runs) in four blocks.

Note that it does not like to confound two-factor interactions with blocks, so you need to say it’s OK.

> FrF2(16,6,blocks=4)
Error in FrF2(16, 6, blocks = 4): no adequate blocked design found with 2fis unconfounded with blocks
> FrF2(16,6,blocks=4,alias.block.2fis = TRUE)
  run.no run.no.std.rp Blocks  A  B  C  D  E  F
1      1         8.1.2      1 -1  1  1  1 -1 -1
2      2        10.1.4      1  1 -1 -1  1  1 -1
3      3         9.1.3      1  1 -1 -1 -1  1  1
4      4         7.1.1      1 -1  1  1 -1 -1  1
  run.no run.no.std.rp Blocks  A  B  C  D  E  F
5      5        12.2.4      2  1 -1  1  1 -1 -1
6      6         5.2.1      2 -1  1 -1 -1  1  1
7      7        11.2.3      2  1 -1  1 -1 -1  1
8      8         6.2.2      2 -1  1 -1  1  1 -1
   run.no run.no.std.rp Blocks  A  B  C  D  E  F
9       9         4.3.2      3 -1 -1  1  1  1  1
10     10        14.3.4      3  1  1 -1  1 -1  1
11     11        13.3.3      3  1  1 -1 -1 -1 -1
12     12         3.3.1      3 -1 -1  1 -1  1 -1
   run.no run.no.std.rp Blocks  A  B  C  D  E  F
13     13         1.4.1      4 -1 -1 -1 -1 -1 -1
14     14        15.4.3      4  1  1  1 -1  1 -1
15     15         2.4.2      4 -1 -1 -1  1 -1  1
16     16        16.4.4      4  1  1  1  1  1  1
class=design, type= FrF2.blocked 
NOTE: columns run.no and run.no.std.rp  are annotation,  not part of the data frame

49.2 Analysis of blocked

These data are a \(2^{5-1}\) from Davies, but run in two blocks of size 8 with ABD=–CE confounded with blocks.

> library(cfcdae)
> library(car)
> A <- factor(rep(1:2,each=1,length=16))
> B <- factor(rep(1:2,each=2,length=16))
> C <- factor(rep(1:2,each=4,length=16))
> D <- factor(rep(1:2,each=8,length=16))
> E<-factor(c(1,2,2,1,2,1,1,2,2,1,1,2,1,2,2,1))
> bl<-factor(c(1,2,2,1,1,2,2,1,2,1,1,2,2,1,1,2))
> y<-c(142,106,88,109,113,162,200,79,101,108,146,72,200,83,115,118)

Begin by fitting the full model and looking at the plot.

ABCD=E is significant, and A is significant by PSE but not by Basso-Salmaso.

> davies.full <- lm(y~A*B*C*D)
> TwoSeriesPlots(davies.full,pse=TRUE)
B set to 3000
Effects plot for Davies data

Figure 49.1: Effects plot for Davies data

If you look at the ANOVA, you’ll see that the next two largest effects are C and ABD=CE (block).

> anova(davies.full)
Warning in anova.lm(davies.full): ANOVA F-tests on an essentially perfect fit are unreliable
Analysis of Variance Table

Response: y
          Df  Sum Sq Mean Sq F value Pr(>F)
A          1  4489.0  4489.0     NaN    NaN
B          1   484.0   484.0     NaN    NaN
C          1  2450.2  2450.2     NaN    NaN
D          1   196.0   196.0     NaN    NaN
A:B        1   342.3   342.3     NaN    NaN
A:C        1   676.0   676.0     NaN    NaN
B:C        1     1.0     1.0     NaN    NaN
A:D        1   552.2   552.2     NaN    NaN
B:D        1     2.2     2.2     NaN    NaN
C:D        1    25.0    25.0     NaN    NaN
A:B:C      1    42.2    42.2     NaN    NaN
A:B:D      1  1444.0  1444.0     NaN    NaN
A:C:D      1     6.3     6.3     NaN    NaN
B:C:D      1   812.3   812.3     NaN    NaN
A:B:C:D    1 11449.0 11449.0     NaN    NaN
Residuals  0     0.0     NaN               

You could project onto ACE and look at the fit. These p-values make A and C look much more significant than Basso-Salmaso would have you believe.

> davies.reduced <- lm(y~bl+A*C*E)
> anova(davies.reduced)
Analysis of Variance Table

Response: y
          Df  Sum Sq Mean Sq F value    Pr(>F)    
bl         1  1444.0  1444.0  7.0055  0.029402 *  
A          1  4489.0  4489.0 21.7780  0.001609 ** 
C          1  2450.3  2450.3 11.8872  0.008723 ** 
E          1 11449.0 11449.0 55.5440 7.245e-05 ***
A:C        1   676.0   676.0  3.2796  0.107733    
A:E        1   812.3   812.3  3.9406  0.082397 .  
A:C:E      1     2.3     2.3  0.0109  0.919362    
Residuals  8  1649.0   206.1                      
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

49.3 Fold over

Recall the Plackett-Burmann design. It had every main effect aliased to every two factor interaction that did not include the effect. Set it up again.

> A <- factor(c(2,2,1,2,2,2,1,1,1,2,1,1))
> B <- factor(c(1,2,2,1,2,2,2,1,1,1,2,1))
> C <- factor(c(2,1,2,2,1,2,2,2,1,1,1,1))
> D <- factor(c(1,2,1,2,2,1,2,2,2,1,1,1))
> E <- factor(c(1,1,2,1,2,2,1,2,2,2,1,1))
> F <- factor(c(1,1,1,2,1,2,2,1,2,2,2,1))
> G <- factor(c(2,1,1,1,2,1,2,2,1,2,2,1))
> H <- factor(c(2,2,1,1,1,2,1,2,2,1,2,1))
> I <- factor(c(2,2,2,1,1,1,2,1,2,2,1,1))
> J <- factor(c(1,2,2,2,1,1,1,2,1,2,2,1))
> K <- factor(c(2,1,2,2,2,1,1,1,2,1,2,1))
> pb <- data.frame(A,B,C,D,E,F,G,H,I,J,K,y=rnorm(12))
> outpb <- lm(y~(A+B+C+D+E+F+G+H+I+J+K)^2,data=pb)
> alias(outpb)
Model :
y ~ (A + B + C + D + E + F + G + H + I + J + K)^2

Complete :
      (Intercept) A1   B1   C1   D1   E1   F1   G1   H1   I1   J1   K1  
A1:B1    0           0    0  1/3 -1/3 -1/3  1/3  1/3 -1/3  1/3  1/3  1/3
A1:C1    0           0  1/3    0  1/3  1/3 -1/3  1/3 -1/3  1/3  1/3 -1/3
A1:D1    0           0 -1/3  1/3    0  1/3  1/3  1/3  1/3  1/3 -1/3 -1/3
A1:E1    0           0 -1/3  1/3  1/3    0 -1/3 -1/3  1/3  1/3  1/3  1/3
A1:F1    0           0  1/3 -1/3  1/3 -1/3    0  1/3  1/3  1/3 -1/3  1/3
A1:G1    0           0  1/3  1/3  1/3 -1/3  1/3    0  1/3 -1/3  1/3 -1/3
A1:H1    0           0 -1/3 -1/3  1/3  1/3  1/3  1/3    0 -1/3  1/3  1/3
A1:I1    0           0  1/3  1/3  1/3  1/3  1/3 -1/3 -1/3    0 -1/3  1/3
A1:J1    0           0  1/3  1/3 -1/3  1/3 -1/3  1/3  1/3 -1/3    0  1/3
A1:K1    0           0  1/3 -1/3 -1/3  1/3  1/3 -1/3  1/3  1/3  1/3    0
B1:C1    0         1/3    0    0  1/3 -1/3 -1/3  1/3  1/3 -1/3  1/3  1/3
B1:D1    0        -1/3    0  1/3    0  1/3  1/3 -1/3  1/3 -1/3  1/3  1/3
B1:E1    0        -1/3    0 -1/3  1/3    0  1/3  1/3  1/3  1/3  1/3 -1/3
B1:F1    0         1/3    0 -1/3  1/3  1/3    0 -1/3 -1/3  1/3  1/3  1/3
B1:G1    0         1/3    0  1/3 -1/3  1/3 -1/3    0  1/3  1/3  1/3 -1/3
B1:H1    0        -1/3    0  1/3  1/3  1/3 -1/3  1/3    0  1/3 -1/3  1/3
B1:I1    0         1/3    0 -1/3 -1/3  1/3  1/3  1/3  1/3    0 -1/3  1/3
B1:J1    0         1/3    0  1/3  1/3  1/3  1/3  1/3 -1/3 -1/3    0 -1/3
B1:K1    0         1/3    0  1/3  1/3 -1/3  1/3 -1/3  1/3  1/3 -1/3    0
C1:D1    0         1/3  1/3    0    0  1/3 -1/3 -1/3  1/3  1/3 -1/3  1/3
C1:E1    0         1/3 -1/3    0  1/3    0  1/3  1/3 -1/3  1/3 -1/3  1/3
C1:F1    0        -1/3 -1/3    0 -1/3  1/3    0  1/3  1/3  1/3  1/3  1/3
C1:G1    0         1/3  1/3    0 -1/3  1/3  1/3    0 -1/3 -1/3  1/3  1/3
C1:H1    0        -1/3  1/3    0  1/3 -1/3  1/3 -1/3    0  1/3  1/3  1/3
C1:I1    0         1/3 -1/3    0  1/3  1/3  1/3 -1/3  1/3    0  1/3 -1/3
C1:J1    0         1/3  1/3    0 -1/3 -1/3  1/3  1/3  1/3  1/3    0 -1/3
C1:K1    0        -1/3  1/3    0  1/3  1/3  1/3  1/3  1/3 -1/3 -1/3    0
D1:E1    0         1/3  1/3  1/3    0    0  1/3 -1/3 -1/3  1/3  1/3 -1/3
D1:F1    0         1/3  1/3 -1/3    0  1/3    0  1/3  1/3 -1/3  1/3 -1/3
D1:G1    0         1/3 -1/3 -1/3    0 -1/3  1/3    0  1/3  1/3  1/3  1/3
D1:H1    0         1/3  1/3  1/3    0 -1/3  1/3  1/3    0 -1/3 -1/3  1/3
D1:I1    0         1/3 -1/3  1/3    0  1/3 -1/3  1/3 -1/3    0  1/3  1/3
D1:J1    0        -1/3  1/3 -1/3    0  1/3  1/3  1/3 -1/3  1/3    0  1/3
D1:K1    0        -1/3  1/3  1/3    0 -1/3 -1/3  1/3  1/3  1/3  1/3    0
E1:F1    0        -1/3  1/3  1/3  1/3    0    0  1/3 -1/3 -1/3  1/3  1/3
E1:G1    0        -1/3  1/3  1/3 -1/3    0  1/3    0  1/3  1/3 -1/3  1/3
E1:H1    0         1/3  1/3 -1/3 -1/3    0 -1/3  1/3    0  1/3  1/3  1/3
E1:I1    0         1/3  1/3  1/3  1/3    0 -1/3  1/3  1/3    0 -1/3 -1/3
E1:J1    0         1/3  1/3 -1/3  1/3    0  1/3 -1/3  1/3 -1/3    0  1/3
E1:K1    0         1/3 -1/3  1/3 -1/3    0  1/3  1/3  1/3 -1/3  1/3    0
F1:G1    0         1/3 -1/3  1/3  1/3  1/3    0    0  1/3 -1/3 -1/3  1/3
F1:H1    0         1/3 -1/3  1/3  1/3 -1/3    0  1/3    0  1/3  1/3 -1/3
F1:I1    0         1/3  1/3  1/3 -1/3 -1/3    0 -1/3  1/3    0  1/3  1/3
F1:J1    0        -1/3  1/3  1/3  1/3  1/3    0 -1/3  1/3  1/3    0 -1/3
F1:K1    0         1/3  1/3  1/3 -1/3  1/3    0  1/3 -1/3  1/3 -1/3    0
G1:H1    0         1/3  1/3 -1/3  1/3  1/3  1/3    0    0  1/3 -1/3 -1/3
G1:I1    0        -1/3  1/3 -1/3  1/3  1/3 -1/3    0  1/3    0  1/3  1/3
G1:J1    0         1/3  1/3  1/3  1/3 -1/3 -1/3    0 -1/3  1/3    0  1/3
G1:K1    0        -1/3 -1/3  1/3  1/3  1/3  1/3    0 -1/3  1/3  1/3    0
H1:I1    0        -1/3  1/3  1/3 -1/3  1/3  1/3  1/3    0    0  1/3 -1/3
H1:J1    0         1/3 -1/3  1/3 -1/3  1/3  1/3 -1/3    0  1/3    0  1/3
H1:K1    0         1/3  1/3  1/3  1/3  1/3 -1/3 -1/3    0 -1/3  1/3    0
I1:J1    0        -1/3 -1/3  1/3  1/3 -1/3  1/3  1/3  1/3    0    0  1/3
I1:K1    0         1/3  1/3 -1/3  1/3 -1/3  1/3  1/3 -1/3    0  1/3    0
J1:K1    0         1/3 -1/3 -1/3  1/3  1/3 -1/3  1/3  1/3  1/3    0    0

Now fold it over (the 3 - bit below turns 1s into 2s and 2s into 1s). When you look at the (very large amount of) aliasing, you at least find that no main effect is aliased to a two-factor interaction. We did get resolution 4. The two-factor interactions are still aliased to each other in a very messy way.

> A2 <- factor(c(A,3-as.numeric(A)))
> B2 <- factor(c(B,3-as.numeric(B)))
> C2 <- factor(c(C,3-as.numeric(C)))
> D2 <- factor(c(D,3-as.numeric(D)))
> E2 <- factor(c(E,3-as.numeric(E)))
> F2 <- factor(c(F,3-as.numeric(F)))
> G2 <- factor(c(G,3-as.numeric(G)))
> H2 <- factor(c(H,3-as.numeric(H)))
> I2 <- factor(c(I,3-as.numeric(I)))
> J2 <- factor(c(J,3-as.numeric(J)))
> K2 <- factor(c(K,3-as.numeric(K)))
> pb.fo <- data.frame(A2,B2,C2,D2,E2,F2,G2,H2,I2,J2,K2,y=rnorm(24))
> pb.fo.lm <- lm(y~(A2+B2+C2+D2+E2+F2+G2+H2+I2+J2+K2)^2,data=pb.fo)
> alias(pb.fo.lm)
Model :
y ~ (A2 + B2 + C2 + D2 + E2 + F2 + G2 + H2 + I2 + J2 + K2)^2

Complete :
        (Intercept) A21  B21  C21  D21  E21  F21  G21  H21  I21  J21  K21  A21:B21 A21:C21 A21:D21
B21:D21    0           0    0    0    0    0    0    0    0    0    0    0    0    -1/3    -1/3   
B21:E21    0           0    0    0    0    0    0    0    0    0    0    0    0     1/3       0   
B21:F21    0           0    0    0    0    0    0    0    0    0    0    0    0     1/3       0   
B21:G21    0           0    0    0    0    0    0    0    0    0    0    0    0     1/3     2/3   
B21:H21    0           0    0    0    0    0    0    0    0    0    0    0    0     1/3       0   
B21:I21    0           0    0    0    0    0    0    0    0    0    0    0    0    -1/3     2/3   
B21:J21    0           0    0    0    0    0    0    0    0    0    0    0    0     1/3     2/3   
B21:K21    0           0    0    0    0    0    0    0    0    0    0    0    0    -1/3     2/3   
C21:D21    0           0    0    0    0    0    0    0    0    0    0    0 -1/3       0     1/3   
C21:E21    0           0    0    0    0    0    0    0    0    0    0    0  1/3       0     2/3   
C21:F21    0           0    0    0    0    0    0    0    0    0    0    0  1/3       0       0   
C21:G21    0           0    0    0    0    0    0    0    0    0    0    0  1/3       0       0   
C21:H21    0           0    0    0    0    0    0    0    0    0    0    0  1/3       0    -2/3   
C21:I21    0           0    0    0    0    0    0    0    0    0    0    0 -1/3       0     2/3   
C21:J21    0           0    0    0    0    0    0    0    0    0    0    0  1/3       0     2/3   
C21:K21    0           0    0    0    0    0    0    0    0    0    0    0 -1/3       0       0   
D21:E21    0           0    0    0    0    0    0    0    0    0    0    0  1/3     1/3     1/3   
D21:F21    0           0    0    0    0    0    0    0    0    0    0    0 -1/3     1/3     1/3   
D21:G21    0           0    0    0    0    0    0    0    0    0    0    0  1/3    -1/3     1/3   
D21:H21    0           0    0    0    0    0    0    0    0    0    0    0  1/3    -1/3     1/3   
D21:I21    0           0    0    0    0    0    0    0    0    0    0    0  1/3     1/3     1/3   
D21:J21    0           0    0    0    0    0    0    0    0    0    0    0  1/3     1/3    -1/3   
D21:K21    0           0    0    0    0    0    0    0    0    0    0    0  1/3     1/3    -1/3   
E21:F21    0           0    0    0    0    0    0    0    0    0    0    0  1/3     1/3    -2/3   
E21:G21    0           0    0    0    0    0    0    0    0    0    0    0  1/3    -1/3       0   
E21:H21    0           0    0    0    0    0    0    0    0    0    0    0  1/3     1/3       0   
E21:I21    0           0    0    0    0    0    0    0    0    0    0    0 -1/3     1/3     2/3   
E21:J21    0           0    0    0    0    0    0    0    0    0    0    0 -1/3    -1/3       0   
E21:K21    0           0    0    0    0    0    0    0    0    0    0    0  1/3    -1/3     2/3   
F21:G21    0           0    0    0    0    0    0    0    0    0    0    0 -1/3    -1/3     2/3   
F21:H21    0           0    0    0    0    0    0    0    0    0    0    0  1/3     1/3     2/3   
F21:I21    0           0    0    0    0    0    0    0    0    0    0    0  1/3    -1/3       0   
F21:J21    0           0    0    0    0    0    0    0    0    0    0    0 -1/3     1/3       0   
F21:K21    0           0    0    0    0    0    0    0    0    0    0    0  1/3     1/3     2/3   
G21:H21    0           0    0    0    0    0    0    0    0    0    0    0 -1/3     1/3     2/3   
G21:I21    0           0    0    0    0    0    0    0    0    0    0    0 -1/3     1/3    -2/3   
G21:J21    0           0    0    0    0    0    0    0    0    0    0    0  1/3     1/3       0   
G21:K21    0           0    0    0    0    0    0    0    0    0    0    0  1/3     1/3       0   
H21:I21    0           0    0    0    0    0    0    0    0    0    0    0  1/3     1/3       0   
H21:J21    0           0    0    0    0    0    0    0    0    0    0    0  1/3    -1/3     2/3   
H21:K21    0           0    0    0    0    0    0    0    0    0    0    0 -1/3     1/3       0   
I21:J21    0           0    0    0    0    0    0    0    0    0    0    0  1/3    -1/3       0   
I21:K21    0           0    0    0    0    0    0    0    0    0    0    0  1/3     1/3       0   
J21:K21    0           0    0    0    0    0    0    0    0    0    0    0 -1/3     1/3     2/3   
        A21:E21 A21:F21 A21:G21 A21:H21 A21:I21 A21:J21 A21:K21 B21:C21
B21:D21  2/3       0     2/3     2/3       0     2/3       0      -1   
B21:E21  1/3     2/3     2/3     2/3    -2/3       0       0      -1   
B21:F21    0    -1/3    -2/3       0     2/3    -2/3     2/3       1   
B21:G21    0    -2/3    -1/3    -2/3       0       0     2/3       1   
B21:H21  2/3     2/3       0     1/3       0     2/3    -2/3      -1   
B21:I21 -2/3       0    -2/3       0     1/3       0     2/3       1   
B21:J21 -2/3    -2/3       0       0     2/3    -1/3       0       1   
B21:K21    0       0       0    -2/3     2/3    -2/3     1/3       1   
C21:D21    0       0    -2/3    -2/3     2/3       0     2/3       1   
C21:E21 -1/3       0    -2/3       0     2/3    -2/3       0       1   
C21:F21  2/3     1/3       0     2/3    -2/3     2/3       0      -1   
C21:G21 -2/3    -2/3    -1/3       0     2/3       0     2/3       1   
C21:H21  2/3     2/3     2/3     1/3       0       0       0      -1   
C21:I21    0    -2/3       0       0     1/3    -2/3     2/3       1   
C21:J21 -2/3       0       0    -2/3       0    -1/3     2/3       1   
C21:K21    0     2/3     2/3     2/3       0     2/3    -1/3      -1   
D21:E21 -1/3    -2/3       0    -2/3     2/3    -2/3     2/3       1   
D21:F21 -2/3    -1/3       0       0       0       0     2/3       1   
D21:G21    0       0    -1/3       0       0    -2/3     2/3       1   
D21:H21 -2/3       0       0    -1/3     2/3       0       0       1   
D21:I21    0    -2/3    -2/3       0     1/3       0       0       1   
D21:J21    0     2/3       0     2/3       0     1/3       0      -1   
D21:K21  2/3     2/3     2/3       0    -2/3     2/3    -1/3      -1   
E21:F21  1/3     1/3     2/3     2/3       0     2/3    -2/3      -1   
E21:G21  1/3     2/3     1/3       0       0     2/3       0      -1   
E21:H21 -1/3       0    -2/3    -1/3       0       0     2/3       1   
E21:I21 -1/3       0       0    -2/3     1/3       0       0       1   
E21:J21 -1/3       0       0       0     2/3    -1/3     2/3       1   
E21:K21 -1/3    -2/3       0       0       0       0     1/3       1   
F21:G21    0    -1/3    -1/3       0     2/3       0       0       1   
F21:H21    0    -1/3       0    -1/3       0    -2/3       0       1   
F21:I21    0    -1/3       0    -2/3     1/3       0     2/3       1   
F21:J21  2/3     1/3     2/3       0       0     1/3       0      -1   
F21:K21 -2/3    -1/3    -2/3    -2/3     2/3       0     1/3       1   
G21:H21 -2/3       0    -1/3    -1/3     2/3    -2/3     2/3       1   
G21:I21  2/3     2/3     1/3     2/3    -1/3     2/3       0      -1   
G21:J21    0       0    -1/3    -2/3     2/3    -1/3       0       1   
G21:K21  2/3       0     1/3     2/3       0       0    -1/3      -1   
H21:I21    0       0     2/3     1/3    -1/3     2/3       0      -1   
H21:J21    0    -2/3    -2/3    -1/3     2/3    -1/3     2/3       1   
H21:K21    0    -2/3       0    -1/3     2/3       0     1/3       1   
I21:J21  2/3     2/3     2/3     2/3    -1/3     1/3    -2/3      -1   
I21:K21 -2/3       0       0       0     1/3    -2/3     1/3       1   
J21:K21    0       0    -2/3       0       0    -1/3     1/3       1   

49.3.1 A really big fold over

Start with a \(2^{20-15}_{III}\). This is a 32 run design for 20 factors. Start with a \(2^5\) design (32 runs) and fit five main effects, 10 two-factor interactions, and five three-factor interactions. The model matrix for this fit is the pattern of +/- for the \(2^{20-15}_{III}\).

> A <- factor(rep(1:2,each=1,length=32))
> B <- factor(rep(1:2,each=2,length=32))
> C <- factor(rep(1:2,each=4,length=32))
> D <- factor(rep(1:2,each=8,length=32))
> E <- factor(rep(1:2,each=16,length=32))
> y <- rnorm(32)
> fit25 <- lm(y~(A+B+C+D+E)^2+A:B:C+A:B:D+A:B:E+A:C:D+A:C:E)
> X <- model.matrix(fit25)
> dim(X)
[1] 32 21
> head(X)
  (Intercept) A1 B1 C1 D1 E1 A1:B1 A1:C1 A1:D1 A1:E1 B1:C1 B1:D1 B1:E1 C1:D1 C1:E1 D1:E1 A1:B1:C1
1           1  1  1  1  1  1     1     1     1     1     1     1     1     1     1     1        1
2           1 -1  1  1  1  1    -1    -1    -1    -1     1     1     1     1     1     1       -1
3           1  1 -1  1  1  1    -1     1     1     1    -1    -1    -1     1     1     1       -1
4           1 -1 -1  1  1  1     1    -1    -1    -1    -1    -1    -1     1     1     1        1
5           1  1  1 -1  1  1     1    -1     1     1    -1     1     1    -1    -1     1       -1
6           1 -1  1 -1  1  1    -1     1    -1    -1    -1     1     1    -1    -1     1        1
  A1:B1:D1 A1:B1:E1 A1:C1:D1 A1:C1:E1
1        1        1        1        1
2       -1       -1       -1       -1
3       -1       -1        1        1
4        1        1       -1       -1
5        1        1       -1       -1
6       -1       -1        1        1

Strip out the column for the intercept. Combine the remaining columns with -1 times the remaining columns (flip the signs of the other columns), pasting the new copy below the original. Then add a column that has 32 1s and 32 -1s.

> X <- X[,-1]
> X <- rbind(X,-X)
> X <- cbind(X,rep(c(-1,1),each=32))
> dim(X)
[1] 64 21
> X
   A1 B1 C1 D1 E1 A1:B1 A1:C1 A1:D1 A1:E1 B1:C1 B1:D1 B1:E1 C1:D1 C1:E1 D1:E1 A1:B1:C1 A1:B1:D1
1   1  1  1  1  1     1     1     1     1     1     1     1     1     1     1        1        1
2  -1  1  1  1  1    -1    -1    -1    -1     1     1     1     1     1     1       -1       -1
3   1 -1  1  1  1    -1     1     1     1    -1    -1    -1     1     1     1       -1       -1
4  -1 -1  1  1  1     1    -1    -1    -1    -1    -1    -1     1     1     1        1        1
5   1  1 -1  1  1     1    -1     1     1    -1     1     1    -1    -1     1       -1        1
6  -1  1 -1  1  1    -1     1    -1    -1    -1     1     1    -1    -1     1        1       -1
7   1 -1 -1  1  1    -1    -1     1     1     1    -1    -1    -1    -1     1        1       -1
8  -1 -1 -1  1  1     1     1    -1    -1     1    -1    -1    -1    -1     1       -1        1
9   1  1  1 -1  1     1     1    -1     1     1    -1     1    -1     1    -1        1       -1
10 -1  1  1 -1  1    -1    -1     1    -1     1    -1     1    -1     1    -1       -1        1
11  1 -1  1 -1  1    -1     1    -1     1    -1     1    -1    -1     1    -1       -1        1
12 -1 -1  1 -1  1     1    -1     1    -1    -1     1    -1    -1     1    -1        1       -1
13  1  1 -1 -1  1     1    -1    -1     1    -1    -1     1     1    -1    -1       -1       -1
14 -1  1 -1 -1  1    -1     1     1    -1    -1    -1     1     1    -1    -1        1        1
15  1 -1 -1 -1  1    -1    -1    -1     1     1     1    -1     1    -1    -1        1        1
16 -1 -1 -1 -1  1     1     1     1    -1     1     1    -1     1    -1    -1       -1       -1
17  1  1  1  1 -1     1     1     1    -1     1     1    -1     1    -1    -1        1        1
18 -1  1  1  1 -1    -1    -1    -1     1     1     1    -1     1    -1    -1       -1       -1
19  1 -1  1  1 -1    -1     1     1    -1    -1    -1     1     1    -1    -1       -1       -1
20 -1 -1  1  1 -1     1    -1    -1     1    -1    -1     1     1    -1    -1        1        1
21  1  1 -1  1 -1     1    -1     1    -1    -1     1    -1    -1     1    -1       -1        1
22 -1  1 -1  1 -1    -1     1    -1     1    -1     1    -1    -1     1    -1        1       -1
23  1 -1 -1  1 -1    -1    -1     1    -1     1    -1     1    -1     1    -1        1       -1
24 -1 -1 -1  1 -1     1     1    -1     1     1    -1     1    -1     1    -1       -1        1
25  1  1  1 -1 -1     1     1    -1    -1     1    -1    -1    -1    -1     1        1       -1
26 -1  1  1 -1 -1    -1    -1     1     1     1    -1    -1    -1    -1     1       -1        1
27  1 -1  1 -1 -1    -1     1    -1    -1    -1     1     1    -1    -1     1       -1        1
28 -1 -1  1 -1 -1     1    -1     1     1    -1     1     1    -1    -1     1        1       -1
29  1  1 -1 -1 -1     1    -1    -1    -1    -1    -1    -1     1     1     1       -1       -1
30 -1  1 -1 -1 -1    -1     1     1     1    -1    -1    -1     1     1     1        1        1
31  1 -1 -1 -1 -1    -1    -1    -1    -1     1     1     1     1     1     1        1        1
32 -1 -1 -1 -1 -1     1     1     1     1     1     1     1     1     1     1       -1       -1
1  -1 -1 -1 -1 -1    -1    -1    -1    -1    -1    -1    -1    -1    -1    -1       -1       -1
2   1 -1 -1 -1 -1     1     1     1     1    -1    -1    -1    -1    -1    -1        1        1
3  -1  1 -1 -1 -1     1    -1    -1    -1     1     1     1    -1    -1    -1        1        1
4   1  1 -1 -1 -1    -1     1     1     1     1     1     1    -1    -1    -1       -1       -1
5  -1 -1  1 -1 -1    -1     1    -1    -1     1    -1    -1     1     1    -1        1       -1
6   1 -1  1 -1 -1     1    -1     1     1     1    -1    -1     1     1    -1       -1        1
7  -1  1  1 -1 -1     1     1    -1    -1    -1     1     1     1     1    -1       -1        1
8   1  1  1 -1 -1    -1    -1     1     1    -1     1     1     1     1    -1        1       -1
9  -1 -1 -1  1 -1    -1    -1     1    -1    -1     1    -1     1    -1     1       -1        1
10  1 -1 -1  1 -1     1     1    -1     1    -1     1    -1     1    -1     1        1       -1
11 -1  1 -1  1 -1     1    -1     1    -1     1    -1     1     1    -1     1        1       -1
12  1  1 -1  1 -1    -1     1    -1     1     1    -1     1     1    -1     1       -1        1
13 -1 -1  1  1 -1    -1     1     1    -1     1     1    -1    -1     1     1        1        1
14  1 -1  1  1 -1     1    -1    -1     1     1     1    -1    -1     1     1       -1       -1
15 -1  1  1  1 -1     1     1     1    -1    -1    -1     1    -1     1     1       -1       -1
16  1  1  1  1 -1    -1    -1    -1     1    -1    -1     1    -1     1     1        1        1
17 -1 -1 -1 -1  1    -1    -1    -1     1    -1    -1     1    -1     1     1       -1       -1
18  1 -1 -1 -1  1     1     1     1    -1    -1    -1     1    -1     1     1        1        1
19 -1  1 -1 -1  1     1    -1    -1     1     1     1    -1    -1     1     1        1        1
20  1  1 -1 -1  1    -1     1     1    -1     1     1    -1    -1     1     1       -1       -1
21 -1 -1  1 -1  1    -1     1    -1     1     1    -1     1     1    -1     1        1       -1
22  1 -1  1 -1  1     1    -1     1    -1     1    -1     1     1    -1     1       -1        1
23 -1  1  1 -1  1     1     1    -1     1    -1     1    -1     1    -1     1       -1        1
24  1  1  1 -1  1    -1    -1     1    -1    -1     1    -1     1    -1     1        1       -1
25 -1 -1 -1  1  1    -1    -1     1     1    -1     1     1     1     1    -1       -1        1
26  1 -1 -1  1  1     1     1    -1    -1    -1     1     1     1     1    -1        1       -1
27 -1  1 -1  1  1     1    -1     1     1     1    -1    -1     1     1    -1        1       -1
28  1  1 -1  1  1    -1     1    -1    -1     1    -1    -1     1     1    -1       -1        1
29 -1 -1  1  1  1    -1     1     1     1     1     1     1    -1    -1    -1        1        1
30  1 -1  1  1  1     1    -1    -1    -1     1     1     1    -1    -1    -1       -1       -1
31 -1  1  1  1  1     1     1     1     1    -1    -1    -1    -1    -1    -1       -1       -1
32  1  1  1  1  1    -1    -1    -1    -1    -1    -1    -1    -1    -1    -1        1        1
   A1:B1:E1 A1:C1:D1 A1:C1:E1   
1         1        1        1 -1
2        -1       -1       -1 -1
3        -1        1        1 -1
4         1       -1       -1 -1
5         1       -1       -1 -1
6        -1        1        1 -1
7        -1       -1       -1 -1
8         1        1        1 -1
9         1       -1        1 -1
10       -1        1       -1 -1
11       -1       -1        1 -1
12        1        1       -1 -1
13        1        1       -1 -1
14       -1       -1        1 -1
15       -1        1       -1 -1
16        1       -1        1 -1
17       -1        1       -1 -1
18        1       -1        1 -1
19        1        1       -1 -1
20       -1       -1        1 -1
21       -1       -1        1 -1
22        1        1       -1 -1
23        1       -1        1 -1
24       -1        1       -1 -1
25       -1       -1       -1 -1
26        1        1        1 -1
27        1       -1       -1 -1
28       -1        1        1 -1
29       -1        1        1 -1
30        1       -1       -1 -1
31        1        1        1 -1
32       -1       -1       -1 -1
1        -1       -1       -1  1
2         1        1        1  1
3         1       -1       -1  1
4        -1        1        1  1
5        -1        1        1  1
6         1       -1       -1  1
7         1        1        1  1
8        -1       -1       -1  1
9        -1        1       -1  1
10        1       -1        1  1
11        1        1       -1  1
12       -1       -1        1  1
13       -1       -1        1  1
14        1        1       -1  1
15        1       -1        1  1
16       -1        1       -1  1
17        1       -1        1  1
18       -1        1       -1  1
19       -1       -1        1  1
20        1        1       -1  1
21        1        1       -1  1
22       -1       -1        1  1
23       -1        1       -1  1
24        1       -1        1  1
25        1        1        1  1
26       -1       -1       -1  1
27       -1        1        1  1
28        1       -1       -1  1
29        1       -1       -1  1
30       -1        1        1  1
31       -1       -1       -1  1
32        1        1        1  1

X is the design matrix for a \(2^{21-15}_{IV}\) design.