This section discusses how to specify the linear model that you plan to fit with the design. The OPTEX procedure provides for the same general linear models as the GLM procedure, although it does not use the GLM procedure’s over-parameterized technique for generating the design matrix (see the section Static Coding.)
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.
Five types of effects can be specified in the MODEL statement. Each row of the design matrix is generated by combining values
for the independent variables according to effects specified in the MODEL statement. This section discusses how to specify
different types of effects and explains how they relate to the columns of the design matrix. In the following, assume that
A, B
, and C
are classification variables and X1, X2
, and X3
are continuous variables.
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.
You can shorten the specification of a factorial model by using the bar operator. For example, the following statements show two ways of specifying a full three-way factorial model:
model a b c a*b a*c b*c a*b*c; model a|b|c;
When the vertical bar (|) is used, the right- and left-hand sides become effects, and their cross becomes an effect. Multiple bars are permitted. The expressions are expanded from left to right by using rules given by Searle (1971). For example, A|B|C is evaluated as follows:
|
|
{ |
|
{ |
|
|
|
The bar operator does not cross a variable with itself. To produce a quadratic term, you must specify it directly.
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 results in only those effects that contain two or fewer variables (in this case A, B, A*B, C, A*C
, and B*C
).
For a three-factor main effects model with A, B, and C as the factors, the MODEL statement is
model a b c;