Chapter Contents |
Previous |
Next |

Details of the OPTEX Procedure |

Each term in a model, called an *effect*, is a variable or
combination of variables. To specify effects, you use a special
notation involving variables and operators. There are two kinds of
variables: *classification variables* and *continuous
variables*. *Classification variables* separate observations
into groups, and the model depends on them through these groups;
on the other hand, the model depends on the actual (or coded)
values of *continuous variables*. There are two primary
operators: *crossing* and *nesting*. A third operator,
the *bar operator*, simplifies the specification for multiple
crossed terms, as in a factorial model. The ** @** operator,
used in combination with the bar operator, further simplifies
specification of crossed terms.

When specifying a model, you must list the classification variables in a CLASS statement. Any variables in the model that are not listed in the CLASS statement are assumed to be continuous. Continuous variables must be numeric.

**Regressor Effects**-
Regressor effects are specified by writing continuous variables by
themselves.

**X1 X2 X3**

For regressor effects, the actual values of the variable are used in the design matrix. **Polynomial Effects**-
Polynomial effects are specified by joining two or more continuous
variables with asterisks.

**X1*X1 X1*X1*X1 X1*X2 X1*X2*X3 X1*X1*X2**

Polynomial effects are also referred to as interactions or cross products of continuous variables; when a variable is joined with itself, polynomial effects are referred to as quadratic effects, cubic effects, and so on. In the preceding examples, the first two effects are the quadratic and cubic effects for X1, respectively. The remaining effects are cross products.

For polynomial effects, the value used in the design matrix is the product of the values of the constituent variables. **Main Effects**-
If a classification variable A has
*k*levels, then its main effect has*k*-1 degrees of freedom, corresponding to*k*-1 independent differences between the mean response at different levels. Main effects are specified by writing class variables by themselves.

**A B C**

Most designs involve main effects since these correspond to the factors in your experiment. For example, in a factorial design for a chemical process, the main effects may be temperature, pressure, and the level of a catalyst.

For information on how the OPTEX procedure generates the*k*-1 columns in the design matrix corresponding to the main effect of a classification variable, see "Design Coding" . **Crossed Effects**-
Crossed effects (or interactions) are specified by joining class
variables with asterisks.

**A*B B*C A*B*C**

The number of degrees of freedom for a crossed effect is the product of the numbers of degrees of freedom for the constituent main effects. The columns in the design matrix corresponding to a crossed effect are formed by the horizontal direct products of the constituent main effects. **Continuous-by-Class Effects**- Continuous-by-class effects are specified by joining continuous
variables and class variables with asterisks.

**X1*A**

The design columns for a continuous-by-class effect are constructed by multiplying the values in the design columns for the continuous variables and the class variable.

Note that all design matrices start with a column of ones for the assumed intercept term unless you use the NOINT option in the MODEL statement.

model a b c a*b a*c b*c a*b*c; model a|b|c;

When the vertical bar (

`|`

`A|B|C`

You can also specify the maximum number of variables involved in
any effect that results from bar evaluation by putting it at the end
of a bar effect, preceded by an ** @** sign. For example, the specification

`A|B|C@2`

model a b c;

model a b c a*b a*c b*c a*b*c; model a|b|c;

model x1 x2 x1*x2 x3 x1*x3 x2*x3 x1*x1 x2*x2 x3*x3; model x1|x2|x3@@2 x1*x1 x2*x2 x3*x3;

Chapter Contents |
Previous |
Next |
Top |

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