DESIGN Subcommand (GLM: Univariate command)
DESIGN specifies
the effects included in a specific model. The cells in a design are
defined by all of the possible combinations of levels of the factors
in that design. The number of cells equals the product of the number
of levels of all the factors. A design is balanced if each cell contains the same number of cases. GLM can analyze both balanced and unbalanced
designs.
- Specify a list of terms to be included in the model, and separate the terms by spaces or commas.
- The default design, if the
DESIGNsubcommand is omitted or is specified by itself, is a design consisting of the following terms in order: the intercept term (ifINTERCEPT=INCLUDEis specified), the covariates that are given in the covariate list, and the full factorial model defined by all factors on the factor list and excluding the intercept. - To include a term for the main effect of a factor,
enter the name of the factor on the
DESIGNsubcommand. - To include the intercept term in the design, use
the keyword
INTERCEPTon theDESIGNsubcommand. IfINTERCEPTis specified on theDESIGNsubcommand, the subcommandINTERCEPT=EXCLUDEis overridden. - To include a term for an interaction between factors,
use the keyword
BYor the asterisk (*) to join the factors that are involved in the interaction. For example, A*B means a two-way interaction effect of A and B, where A and B are factors. A*A is not allowed because factors inside an interaction effect must be distinct. - To include a term for nesting one effect within another
effect, use the keyword
WITHINor use a pair of parentheses on theDESIGNsubcommand. For example, A(B) means that A is nested within B. The expression A(B) is equivalent to the expression A WITHIN B. When more than one pair of parentheses is present, each pair of parentheses must be enclosed or nested within another pair of parentheses. Thus, A(B)(C) is not valid. - Multiple nesting is allowed. For example, A(B(C)) means that B is nested within C and A is nested within B(C).
- Interactions between nested effects are not valid. For example, neither A(C)*B(C) nor A(C)*B(D) is valid.
- To include a covariate term in the design,
enter the name of the covariate on the
DESIGNsubcommand. - Covariates can be connected—but not nested—through
the * operator to form another covariate effect. Therefore, interactions
among covariates such as X1*X1 and X1*X2 are valid but not X1(X2). Using covariate effects such as X1*X1, X1*X1*X1, X1*X2, and X1*X1*X2*X2 makes fitting a polynomial regression model
easy in
GLM. - Factor and covariate effects can be connected only by the * operator. Suppose A and B are factors and X1 and X2 are covariates. Examples of valid factor-by-covariate interaction effects are A*X1, A*B*X1, X1*A(B), A*X1*X1, and B*X1*X2.
- If more than one
DESIGNsubcommand is specified, only the last subcommand is in effect.
Example
GLM Y BY A B C WITH X
/DESIGN A B(A) X*A.
- In this example, the design consists of a main effect A, a nested effect B within A, and an interaction effect of a covariate X with a factor A.