DESIGN Subcommand (VARCOMP command)
The DESIGN
subcommand specifies the effects in a model. DESIGN
can be specified anywhere after the variable list.
If more than one DESIGN
subcommand
is specified, only the last subcommand is in effect.
- Specify a list of effect terms to be included in
the design. Each term must be separated from the next term by a comma
or a space. Valid specifications include the keyword
INTERCEPT
, factors, covariates, and interaction or nested terms. - The factors and covariates must have been specified on the variable list.
- If a factor is specified on the
RANDOM
subcommand, all effects that include that factor are random effects. - If the
DESIGN
subcommand is omitted or specified without any term, the default design is generated. The default design includes the intercept term (ifINTERCEPT=EXCLUDE
is not specified), the covariates (if any) in the order in which they are specified on the variable list, the main factorial effects, and all orders of factor-by-factor interaction.
INTERCEPT. Include the intercept term. Specifying INTERCEPT
on DESIGN
explicitly includes the intercept term, regardless of the specification
on the INTERCEPT
subcommand.
BY. Interaction. You can also use the asterisk (*). Interaction terms can be formed among factors, among covariates, and between factors and covariates.
- Factors inside an interaction effect must be distinct.
For factors A, B, and C, expressions like
A*C*A
orA*A
are invalid. - Covariates inside an interaction effect do not have
to be distinct. For covariate X,
X*X
is the product of X and itself. This is equivalent to a covariate whose values are the square of the values of X.
WITHIN. Nesting. You can also use a pair of parentheses.
Factors and covariates can be nested within factors, but no effects
can be nested within covariates. Suppose that A and B are factors
and X and Y are covariates. Both A(B)
and X(B)
are valid, but X(Y)
is not valid.
- Factors inside a nested effect must be distinct.
Expressions like
A(A)
are invalid. - Multiple-level nesting is supported. For example,
A(B(C))
orA WITHIN B WITHIN C
means that factor B is nested within factor C, and factor A is nested within B(C). The expressionA(B)(C)
is invalid. - Nesting within an interaction effect is valid. For
example,
A(B*C)
means that factor A is nested within B*C whileX(A*B)
means that covariate X is nested within A*B. - Interactions among nested effects are allowed. For
example,
A*B(C)
means interaction between A and B within levels of C.X*Y(A)
means the product of X and Y nested within levels of C. The expressionA(C)*B(C)
is invalid.
Example
VARCOM Y BY DRUG SUBJECT WITH X
/RANDOM = SUBJECT
/DESIGN = DRUG SUBJECT DRUG*SUBJECT X*SUBJECT.
- The
DESIGN
subcommand specifies two main effects and two interaction terms. - All effects that involve the factor SUBJECT are assumed to be random.