factDesign: Full Factorial Designs

Description Usage Arguments Details Value Author(s) Examples

Description

Create a factorial design with n = pow(levels,dimension) experiments in [0,1]^d.

Usage

1
factDesign(dimension, levels)

Arguments

dimension

an integer given the number of input variables

levels

an integer given the number of levels

Details

It is possible to take a different number of levels for any factor. In this case, the argument levels should be a vector.

Value

factDesign returns a list containing all the input arguments detailed before, plus the following components:

n

the number of experiments

design

the design of experiments

Author(s)

G. Pujol and J. Franco

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## First example
g1 <- factDesign(2, 7)
plot(g1$design, xlim=c(0,1), ylim=c(0,1))

## Second example
g2 <- factDesign(2, c(2,7))
plot(g2$design, xlim=c(0,1), ylim=c(0,1))

## Change the dimnames, adjust to range (-10, 10) and round to 2 digits
xDRDN(g1, letter = "T", dgts = 2, range = c(-10, 10))
xDRDN(g2, letter = "T", dgts = 2, range = c(-10, 10))

Example output

       T1     T2
1  -10.00 -10.00
2  -10.00  -6.67
3  -10.00  -3.33
4  -10.00   0.00
5  -10.00   3.33
6  -10.00   6.67
7  -10.00  10.00
8   -6.67 -10.00
9   -6.67  -6.67
10  -6.67  -3.33
11  -6.67   0.00
12  -6.67   3.33
13  -6.67   6.67
14  -6.67  10.00
15  -3.33 -10.00
16  -3.33  -6.67
17  -3.33  -3.33
18  -3.33   0.00
19  -3.33   3.33
20  -3.33   6.67
21  -3.33  10.00
22   0.00 -10.00
23   0.00  -6.67
24   0.00  -3.33
25   0.00   0.00
26   0.00   3.33
27   0.00   6.67
28   0.00  10.00
29   3.33 -10.00
30   3.33  -6.67
31   3.33  -3.33
32   3.33   0.00
33   3.33   3.33
34   3.33   6.67
35   3.33  10.00
36   6.67 -10.00
37   6.67  -6.67
38   6.67  -3.33
39   6.67   0.00
40   6.67   3.33
41   6.67   6.67
42   6.67  10.00
43  10.00 -10.00
44  10.00  -6.67
45  10.00  -3.33
46  10.00   0.00
47  10.00   3.33
48  10.00   6.67
49  10.00  10.00
    T1     T2
1  -10 -10.00
2  -10  -6.67
3  -10  -3.33
4  -10   0.00
5  -10   3.33
6  -10   6.67
7  -10  10.00
8   10 -10.00
9   10  -6.67
10  10  -3.33
11  10   0.00
12  10   3.33
13  10   6.67
14  10  10.00

DiceDesign documentation built on Feb. 13, 2021, 1:06 a.m.