Statistics Toolbox    

Including Categorical Factors

Another example where it is useful to call candexch directly is to generate a design that includes categorical factors. For these designs you create a candidate set containing "dummy variables" for the categorical factors. The dummyvar function is useful to create such a candidate set.

In this example we have three categorical factors, each taking three levels. We create a candidate set F containing all 27 combinations of these factor levels. Then we create a matrix C containing dummy variables for the factors, and we remove enough columns to make the resulting matrix full rank. (We remove one column for each factor except the first factor.) Finally, we use the candexch function to generate a 9-run design. The resulting design has the property that for each pair of factors, each of the 9 possible combinations of levels appears exactly once.


  Controlling Candidate Points Demos