DESIGNF Function

DESIGNF (column-vector) ;

The DESIGNF function creates a design matrix of zeros and ones from the column vector specified by column-vector. The DESIGNF function is similar to the DESIGN function. The difference is that the matrix returned by the DESIGNF function is one column smaller than the matrix returned by the DESIGN function. The result of the DESIGNF function is obtained by subtracting the last column of the DESIGN function matrix from the other columns.

For example, the following statements produce a design matrix for a column vector that contains three unique values:

x = {C, A, B, B, A, A};
m = designf(x);

cols = unique(x);
print m[colname=cols];

Figure 24.100: Design Matrix for Vector with Three Unique Values

m
A B
-1 -1
1 0
0 1
0 1
1 0
1 0


The matrix that is returned by the DESIGNF function can be used to produce full-rank designs. The matrix corresponds to the EFFECT parameterization of classification variables as documented in the section Parameterization of Model Effects in the SAS/STAT User's Guide.