# unidTab: Uniform Design Table In mixtox: Curve Fitting and Mixture Toxicity Assessment

## Description

The good lattice point method with a power generator was used to construct the uniform experimental tables . The centered L2-discrepancy (CD2) and the symmetric discrepancy algorithms (sd2) were employed to measure the uniformity and find the one with lowest discrepancy.

## Usage

 1 unidTab(lev, fac, algo = "cd2") 

## Arguments

 lev the number of runs (levels or pseudo-levels) fac the number of factors algo algorithms used to calculate the discrepancy. "cd2": the centered L2-discrepancy algorithm. "sd2": the symmetric discrepancy algorithm.

## Details

Uniform design (UD) was proposed by Fang et al (Acta Math Appl Sin 3:363-372 (1980)). An appropriate uniform design table is constructed according to the factor (the number mixture components) and level (the number of experiments need to run). Many methods can be used to construct the uniform table. In the past decades many methods have been proposed for constructing (nearly) uniform designs, such as the good lattice point (glp) method, the glp method with a power generator (pglp method) (Fang 1980; Fang andWang 1994), the cutting method (Maand Fang 2004), the optimization method (Winker and Fang 1998).
However, when s is large, the glp method has a large computational cost. And the pglp method has the lowest computation complexity among various methods in quasi-Monte Carlo methods and a good performance when n or n + 1 is a prime number and s is small (Fang 1980; Fang and Wang 1994), while the pglp method may have a poor performance when s is large. Here, we choose the glp method with a power generator to construct the uniform table. The centered L2-discrepancy (cd2) is set as default over the symmetric discrepancy algorithm for its accuracy. The cd2 algorithm is defined as follows:

C{D_2}(P) = {≤ft[ {{{≤ft( {\frac{{13}}{{12}}} \right)}^s} - \frac{{{2^{1 - s}}}} {n}∑\limits_{k = 1}^n {∏\limits_{i = 1}^s {{θ _{ki}} + \frac{1}{{{n^2}}} ∑\limits_{k,l = 1}^n {∏\limits_{i = 1}^s {{φ _{k,li}}} } } } } \right]^{\frac{1}{2}}}

With the definition of θ _{ki} and φ _{k,li} as follows:

{θ _{ki}} = 2 + ≤ft| {{x_{ki}} - \frac{1}{2}} \right| - {≤ft| {{x_{ki}} - \frac{1}{2}} \right|^2}

{φ _{k,li}} = 1 + \frac{1}{2}≤ft( {≤ft| {{x_{ki}} - \frac{1}{2}} \right| + ≤ft| {{x_{li}} - \frac{1}{2}} \right| - ≤ft| {{x_{ki}} - {x_{li}}} \right|} \right)

where n, s are the number of runs (levels or multiple of levels) and the number of input variables (factors), respectively.

## Value

 T  the selected uniform table(s) . It may contain one or more uniform tables with the same discrepancy D  the discrepancy of the constructed uniform table

## References

Wang, Y., Fang, K.-T., 1996. Uniform design of experiments with mixtures. Sci. China Ser. A-Mathematics Phys. Astron. 39, 264-275.
Hickernell, F.J., 1996. A generalized discrepancy and quadrature error bound. Math. Comput. 67, 299-322.

## Examples

  1 2 3 4 5 6 7 8 9 10 11 12 13 ## example 1 # construct uniform table with 11 runs and 7 factors using the default centered L2-discrepancy # algorithm unidTab(11, 7) ## example 2 # construct uniform table with 37 runs and 13 factors using the symmetric discrepancy algorithm unidTab(lev = 37, fac = 13, algo = "sd2" ) ## example 3 # construct uniform table with 37 runs and 13 factors using default centered L2-discrepancy # algorithm unidTab(lev = 37, fac = 13, algo = "cd2" ) 

### Example output

$T [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1 4 6 7 8 9 10 [2,] 2 8 1 3 5 7 9 [3,] 3 1 7 10 2 5 8 [4,] 4 5 2 6 10 3 7 [5,] 5 9 8 2 7 1 6 [6,] 6 2 3 9 4 10 5 [7,] 7 6 9 5 1 8 4 [8,] 8 10 4 1 9 6 3 [9,] 9 3 10 8 6 4 2 [10,] 10 7 5 4 3 2 1 [11,] 11 11 11 11 11 11 11$D
[1] 0.3475661

$T [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 1 17 30 29 12 19 27 15 33 6 28 32 26 [2,] 2 34 23 21 24 1 17 30 29 12 19 27 15 [3,] 3 14 16 13 36 20 7 8 25 18 10 22 4 [4,] 4 31 9 5 11 2 34 23 21 24 1 17 30 [5,] 5 11 2 34 23 21 24 1 17 30 29 12 19 [6,] 6 28 32 26 35 3 14 16 13 36 20 7 8 [7,] 7 8 25 18 10 22 4 31 9 5 11 2 34 [8,] 8 25 18 10 22 4 31 9 5 11 2 34 23 [9,] 9 5 11 2 34 23 21 24 1 17 30 29 12 [10,] 10 22 4 31 9 5 11 2 34 23 21 24 1 [11,] 11 2 34 23 21 24 1 17 30 29 12 19 27 [12,] 12 19 27 15 33 6 28 32 26 35 3 14 16 [13,] 13 36 20 7 8 25 18 10 22 4 31 9 5 [14,] 14 16 13 36 20 7 8 25 18 10 22 4 31 [15,] 15 33 6 28 32 26 35 3 14 16 13 36 20 [16,] 16 13 36 20 7 8 25 18 10 22 4 31 9 [17,] 17 30 29 12 19 27 15 33 6 28 32 26 35 [18,] 18 10 22 4 31 9 5 11 2 34 23 21 24 [19,] 19 27 15 33 6 28 32 26 35 3 14 16 13 [20,] 20 7 8 25 18 10 22 4 31 9 5 11 2 [21,] 21 24 1 17 30 29 12 19 27 15 33 6 28 [22,] 22 4 31 9 5 11 2 34 23 21 24 1 17 [23,] 23 21 24 1 17 30 29 12 19 27 15 33 6 [24,] 24 1 17 30 29 12 19 27 15 33 6 28 32 [25,] 25 18 10 22 4 31 9 5 11 2 34 23 21 [26,] 26 35 3 14 16 13 36 20 7 8 25 18 10 [27,] 27 15 33 6 28 32 26 35 3 14 16 13 36 [28,] 28 32 26 35 3 14 16 13 36 20 7 8 25 [29,] 29 12 19 27 15 33 6 28 32 26 35 3 14 [30,] 30 29 12 19 27 15 33 6 28 32 26 35 3 [31,] 31 9 5 11 2 34 23 21 24 1 17 30 29 [32,] 32 26 35 3 14 16 13 36 20 7 8 25 18 [33,] 33 6 28 32 26 35 3 14 16 13 36 20 7 [34,] 34 23 21 24 1 17 30 29 12 19 27 15 33 [35,] 35 3 14 16 13 36 20 7 8 25 18 10 22 [36,] 36 20 7 8 25 18 10 22 4 31 9 5 11 [37,] 37 37 37 37 37 37 37 37 37 37 37 37 37$D
[1] 14.4474

$T [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] 1 13 21 14 34 35 11 32 9 6 4 15 10 [2,] 2 26 5 28 31 33 22 27 18 12 8 30 20 [3,] 3 2 26 5 28 31 33 22 27 18 12 8 30 [4,] 4 15 10 19 25 29 7 17 36 24 16 23 3 [5,] 5 28 31 33 22 27 18 12 8 30 20 1 13 [6,] 6 4 15 10 19 25 29 7 17 36 24 16 23 [7,] 7 17 36 24 16 23 3 2 26 5 28 31 33 [8,] 8 30 20 1 13 21 14 34 35 11 32 9 6 [9,] 9 6 4 15 10 19 25 29 7 17 36 24 16 [10,] 10 19 25 29 7 17 36 24 16 23 3 2 26 [11,] 11 32 9 6 4 15 10 19 25 29 7 17 36 [12,] 12 8 30 20 1 13 21 14 34 35 11 32 9 [13,] 13 21 14 34 35 11 32 9 6 4 15 10 19 [14,] 14 34 35 11 32 9 6 4 15 10 19 25 29 [15,] 15 10 19 25 29 7 17 36 24 16 23 3 2 [16,] 16 23 3 2 26 5 28 31 33 22 27 18 12 [17,] 17 36 24 16 23 3 2 26 5 28 31 33 22 [18,] 18 12 8 30 20 1 13 21 14 34 35 11 32 [19,] 19 25 29 7 17 36 24 16 23 3 2 26 5 [20,] 20 1 13 21 14 34 35 11 32 9 6 4 15 [21,] 21 14 34 35 11 32 9 6 4 15 10 19 25 [22,] 22 27 18 12 8 30 20 1 13 21 14 34 35 [23,] 23 3 2 26 5 28 31 33 22 27 18 12 8 [24,] 24 16 23 3 2 26 5 28 31 33 22 27 18 [25,] 25 29 7 17 36 24 16 23 3 2 26 5 28 [26,] 26 5 28 31 33 22 27 18 12 8 30 20 1 [27,] 27 18 12 8 30 20 1 13 21 14 34 35 11 [28,] 28 31 33 22 27 18 12 8 30 20 1 13 21 [29,] 29 7 17 36 24 16 23 3 2 26 5 28 31 [30,] 30 20 1 13 21 14 34 35 11 32 9 6 4 [31,] 31 33 22 27 18 12 8 30 20 1 13 21 14 [32,] 32 9 6 4 15 10 19 25 29 7 17 36 24 [33,] 33 22 27 18 12 8 30 20 1 13 21 14 34 [34,] 34 35 11 32 9 6 4 15 10 19 25 29 7 [35,] 35 11 32 9 6 4 15 10 19 25 29 7 17 [36,] 36 24 16 23 3 2 26 5 28 31 33 22 27 [37,] 37 37 37 37 37 37 37 37 37 37 37 37 37$D
[1] 0.5204259


mixtox documentation built on May 1, 2019, 8:41 p.m.