gen.mixture {AlgDesign} | R Documentation |

## Generate mixture

### Description

Creates a candidate list of mixture variables.

### Usage

```
gen.mixture(levels,vars)
```

### Arguments

`levels` |
An integer greater than 1. The number of levels of the mixture variables. |

`vars` |
Either the number of variables, or a character vector of variable names. |

### Details

Similar in function to gen.factorial(), but for mixture variables such that the rows sum to unity.
For `levels=2`

, the identity matrix is produced, so that each variable is either 0 or 1. For
`levels=3`

, rows are added to the identity containing two variables at 1/2 and the others at 0. etc.

In general, a mixture model of degree d will have the same number of terms as the candidate
list generated by `gen.mixture`

for `levels=d+1`

, and this will be optimal.

### Author(s)

Bob Wheeler bwheelerg@gmail.com

Please cite this program as follows:

Wheeler, R.E. (2004). gen.mixture. *AlgDesign*. The R project for statistical computing https://www.r-project.org/

*AlgDesign*version 1.2.1 Index]