Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Language Reference

DESIGN Function

creates a design matrix

DESIGN( column-vector)

where column-vector is a numeric column vector or literal.

The DESIGN function creates a design matrix of 0s and 1s from column-vector. Each unique value of the vector generates a column of the design matrix. This column contains ones in elements with corresponding elements in the vector that are the current value; it contains zeros elsewhere. The columns are arranged in the sort order of the original values.

For example, the statements

   a={1,1,2,2,3,1};
   a=design(a);
produce the design matrix
             A             6 rows      3 cols    (numeric)

                             1         0         0
                             1         0         0
                             0         1         0
                             0         1         0
                             0         0         1
                             1         0         0

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.