Function to generate simplex lattice and simplex centroid mixture designs with optional center points and axial points.
Usage
mixDesign(
p,
n = 3,
type = "lattice",
center = TRUE,
axial = FALSE,
delta,
replicates = 1,
lower,
total = 1,
randomize,
seed = 1234
)Arguments
- p
Numerical value giving the amount of factors.
- n
Numerical value specifying the degree (ignored if type = `centroid`).
- type
Character string giving the type of design.
typecan be `lattice` or `centroid` (referencing to the first source under the section references]. By defaulttypeis set to `lattice`.- center
Logical value specifying whether (optional) center points will be added. By default `center` is set to `TRUE`.
- axial
Logical value specifying whether (optional) axial points will be added. By default `axial` is set to `FALSE`.
- delta
Numerical value giving the delta (see references) for axial runs. No default setting.
- replicates
Vector with the number of replicates for the different design points i.e. c(center = 1, axial = 1, pureBlend = 1, BinaryBlend = 1, p-3 blend, p-2 blend, p-1 blend). By default `replicates` is set to `1`.
- lower
Numeric vector of lower-bound constraints on the component proportions (i.e. must be given in percent).
- total
Numeric vector with
[1] the percentage of the mixture made up by the q - components (e.g. q = 3 and x1 + x2 + x3 = 0.8, total = 0.8 with 0.2 for the other factors being held constant)
[2] overall total in corresponding units (e.g. 200ml for the overall mixture)
- randomize
Logical value. If `TRUE` the RunOrder of the mixture design will be randomized (default).
- seed
Nmerical value giving the input for set.seed.
Note
In this version the creation of (augmented) lattice, centroid mixture designs is fully supported. Getters and Setter methods for the mixDesign object exist just as for objects of class facDesign (i.e. factorial designs).
The creation of constrained component proportions is partially supported but don't rely on it. Visualization (i.e. ternary plots) for some of these designs can be done with the help of the wirePlot3 and contourPlot3 function.
Examples
# Example usage of mixDesign
mdo <- mixDesign(3, 2, center = FALSE, axial = FALSE, randomize = FALSE, replicates = c(1, 1, 2, 3))
mdo$names(c("polyethylene", "polystyrene", "polypropylene"))
elongation <- c(11.0, 12.4, 15.0, 14.8, 16.1, 17.7,
16.4, 16.6, 8.8, 10.0, 10.0, 9.7,
11.8, 16.8, 16.0)
mdo$.response(elongation)
mdo$units()
#> $polyethylene
#> [1] "%"
#>
#> $polystyrene
#> [1] "%"
#>
#> $polypropylene
#> [1] "%"
#>
mdo$summary()
#> Simplex LATTICE Design
#> Information about the factors:
#>
#> polyethylene polystyrene polypropylene
#> low 0 0 0
#> high 1 1 1
#> name polyethylene polystyrene polypropylene
#> unit % % %
#> type numeric numeric numeric
#>
#> -----------
#>
#> Information about the Design Points:
#>
#> 1-blend 2-blend
#> Unique 3 3
#> Replicates 2 3
#> Sub Total 6 9
#> Total 15
#>
#> -----------
#>
#> Information about the constraints:
#>
#> A >= 0 B >= 0 C >= 0
#>
#> -----------
#>
#> PseudoComponent _|_ Proportion _|_ Amount
#>
#> StandOrder RunOrder Type | A B C _ | _ A B C _ | _ A B
#> 1 1 1 1-blend | 1.0 0.0 0.0 | 1.0 0.0 0.0 | 1.0 0.0
#> 2 2 2 1-blend | 1.0 0.0 0.0 | 1.0 0.0 0.0 | 1.0 0.0
#> 3 3 3 2-blend | 0.5 0.5 0.0 | 0.5 0.5 0.0 | 0.5 0.5
#> 4 4 4 2-blend | 0.5 0.5 0.0 | 0.5 0.5 0.0 | 0.5 0.5
#> 5 5 5 2-blend | 0.5 0.5 0.0 | 0.5 0.5 0.0 | 0.5 0.5
#> 6 6 6 2-blend | 0.5 0.0 0.5 | 0.5 0.0 0.5 | 0.5 0.0
#> 7 7 7 2-blend | 0.5 0.0 0.5 | 0.5 0.0 0.5 | 0.5 0.0
#> 8 8 8 2-blend | 0.5 0.0 0.5 | 0.5 0.0 0.5 | 0.5 0.0
#> 9 9 9 1-blend | 0.0 1.0 0.0 | 0.0 1.0 0.0 | 0.0 1.0
#> 10 10 10 1-blend | 0.0 1.0 0.0 | 0.0 1.0 0.0 | 0.0 1.0
#> 11 11 11 2-blend | 0.0 0.5 0.5 | 0.0 0.5 0.5 | 0.0 0.5
#> 12 12 12 2-blend | 0.0 0.5 0.5 | 0.0 0.5 0.5 | 0.0 0.5
#> 13 13 13 2-blend | 0.0 0.5 0.5 | 0.0 0.5 0.5 | 0.0 0.5
#> 14 14 14 1-blend | 0.0 0.0 1.0 | 0.0 0.0 1.0 | 0.0 0.0
#> 15 15 15 1-blend | 0.0 0.0 1.0 | 0.0 0.0 1.0 | 0.0 0.0
#> C | elongation
#> 1 0.0 | 11.0
#> 2 0.0 | 12.4
#> 3 0.0 | 15.0
#> 4 0.0 | 14.8
#> 5 0.0 | 16.1
#> 6 0.5 | 17.7
#> 7 0.5 | 16.4
#> 8 0.5 | 16.6
#> 9 0.0 | 8.8
#> 10 0.0 | 10.0
#> 11 0.5 | 10.0
#> 12 0.5 | 9.7
#> 13 0.5 | 11.8
#> 14 1.0 | 16.8
#> 15 1.0 | 16.0
#>
#> -----------
#>
#> Mixture Total: 1 equals 1
#>