Description Usage Arguments Details Value Note Author(s) See Also Examples
Generates a 2^k full- or fractional factorial design.
1 2 | fracDesign(k = 3, p = 0, gen = NULL, replicates = 1, blocks = 1, centerCube = 0,
random.seed = 1234)
|
k |
numeric value giving the number of factors. By default |
p |
numeric integer between ‘0’ and ‘7’. |
gen |
one or more defining relations for a fractional factorial design. By default |
replicates |
numeric value giving the number of replicates per factor combination. By default |
blocks |
numeric value giving the number of blocks. By default |
centerCube |
numeric value giving the number of centerpoints within the 2^k design. By default |
random.seed |
seed for randomization of the design |
fracDesign generates 2^k full- or fractional factorial designs.
fracDesign
returns an object of class facDesign.
For an example in context which shows the usage of the function fracDesign()
please read the vignette for the package qualityTools
at http://www.r-qualitytools.org/html/Improve.html.
Thomas Roth thomas.roth@tu-berlin.de
facDesign
fracChoose
pbDesign
rsmDesign
taguchiDesign
http://www.r-qualitytools.org/html/Improve.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #returns a 2^3 full factorial design
vp.full = facDesign(k = 3)
#design in 2 blocks
vp.full = blocking(vp.full, 2)
#generate some random response
response(vp.full) = rnorm(2^3)
#summary of the full factorial design (especially no defining relation)
summary(vp.full)
#returns a 2^4-1 fractional factorial design. Factor D will be aliased with
vp.frac = fracDesign(k = 4, gen = "D=ABC")
#the three-way-interaction ABC (i.e. I = ABCD)
response(vp.frac) = rnorm(2^(4-1))
#summary of the fractional factorial design
summary(vp.frac)
#returns a full factorial design with 3 replications per factor combination
#and 4 center points
vp.rep = fracDesign(k = 3, replicates = 3, centerCube = 4)
#summary of the replicated fractional factorial Design
summary(vp.rep)
|
Loading required package: Rsolnp
Loading required package: MASS
Attaching package: 'qualityTools'
The following object is masked from 'package:stats':
sigma
Warning messages:
1: In `[<-`(`*tmp*`, i, value = <S4 object of class "doeFactor">) :
implicit list embedding of S4 objects is deprecated
2: In `[<-`(`*tmp*`, i, value = <S4 object of class "doeFactor">) :
implicit list embedding of S4 objects is deprecated
3: In `[<-`(`*tmp*`, i, value = <S4 object of class "doeFactor">) :
implicit list embedding of S4 objects is deprecated
Information about the factors:
A B C
low -1 -1 -1
high 1 1 1
name
unit
type numeric numeric numeric
-----------
StandOrder RunOrder Block A B C rnorm.2.3.
6 6 1 1 1 -1 1 -0.91149314
4 4 2 1 1 1 -1 -0.64604795
7 7 3 1 -1 1 1 -1.21969321
1 1 4 1 -1 -1 -1 0.29408749
3 3 5 2 -1 1 -1 -0.53747162
5 5 6 2 -1 -1 1 -0.04947574
8 8 7 2 1 1 1 -0.27433356
2 2 8 2 1 -1 -1 0.24014825
Warning messages:
1: In `[<-`(`*tmp*`, i, value = new("doeFactor")) :
implicit list embedding of S4 objects is deprecated
2: In `[<-`(`*tmp*`, i, value = new("doeFactor")) :
implicit list embedding of S4 objects is deprecated
3: In `[<-`(`*tmp*`, i, value = new("doeFactor")) :
implicit list embedding of S4 objects is deprecated
4: In `[<-`(`*tmp*`, i, value = new("doeFactor")) :
implicit list embedding of S4 objects is deprecated
Information about the factors:
A B C D
low -1 -1 -1 -1
high 1 1 1 1
name
unit
type numeric numeric numeric numeric
-----------
StandOrder RunOrder Block A B C D rnorm.2..4...1..
4 4 1 1 1 1 -1 -1 -0.91149314
3 3 2 1 -1 1 -1 1 -0.64604795
2 2 3 1 1 -1 -1 1 -1.21969321
5 5 4 1 -1 -1 1 1 0.29408749
6 6 5 1 1 -1 1 -1 -0.53747162
7 7 6 1 -1 1 1 -1 -0.04947574
8 8 7 1 1 1 1 1 -0.27433356
1 1 8 1 -1 -1 -1 -1 0.24014825
---------
Defining relations:
I = ABCD Columns: 1 2 3 4
Resolution: IV
Warning messages:
1: In `[<-`(`*tmp*`, i, value = new("doeFactor")) :
implicit list embedding of S4 objects is deprecated
2: In `[<-`(`*tmp*`, i, value = new("doeFactor")) :
implicit list embedding of S4 objects is deprecated
3: In `[<-`(`*tmp*`, i, value = new("doeFactor")) :
implicit list embedding of S4 objects is deprecated
Information about the factors:
A B C
low -1 -1 -1
high 1 1 1
name
unit
type numeric numeric numeric
-----------
StandOrd RunOrder Block A B C y
16 16 1 1 1 1 1 NA
4 4 2 1 1 1 -1 NA
14 14 3 1 1 -1 1 NA
9 9 4 1 -1 -1 -1 NA
3 3 5 1 -1 1 -1 NA
18 18 6 1 1 -1 -1 NA
24 24 7 1 1 1 1 NA
20 20 8 1 1 1 -1 NA
15 15 9 1 -1 1 1 NA
2 2 10 1 1 -1 -1 NA
28 28 11 1 0 0 0 NA
8 8 12 1 1 1 1 NA
7 7 13 1 -1 1 1 NA
23 23 14 1 -1 1 1 NA
22 22 15 1 1 -1 1 NA
12 12 16 1 1 1 -1 NA
25 25 17 1 0 0 0 NA
19 19 18 1 -1 1 -1 NA
5 5 19 1 -1 -1 1 NA
17 17 20 1 -1 -1 -1 NA
21 21 21 1 -1 -1 1 NA
10 10 22 1 1 -1 -1 NA
11 11 23 1 -1 1 -1 NA
27 27 24 1 0 0 0 NA
13 13 25 1 -1 -1 1 NA
6 6 26 1 1 -1 1 NA
1 1 27 1 -1 -1 -1 NA
26 26 28 1 0 0 0 NA
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.