You can use the Effects tab to add several different types of effects to your model. All effects appear in the list. You can specify the following types of effects:
main effects
crossed effects
nested effects
You can also use the tab to quickly create certain standard effects: factorial effects, polynomial effects, and multivariate polynomial effects.
The notation for an effect consists of variable names, asterisks, and at most one pair of parentheses. The asterisks denote interactions; the parentheses denote nested effects. There are two rules to follow when specifying effects:
A nominal variable can appear in an effect at most once.
An interval variable cannot appear inside parentheses.
The following text describes how to specify effects on the Effects tab. In the descriptions, assume that A, B, and C are classification variables and that X and Y are interval variables.
The notation for a main effect is just the name of the variable itself.
To specify a main effect:
The effects are added to the Figure 23.6. Each main effect appears on a line by itself in the list. Because main effects are automatically added to this list when you select a variable on the Variables tab, you usually do not need to add main effects.
list, as shown in
The notation for a crossed effect is two or more variable names that are joined by asterisks. A crossed effect can involve
one or more interval variables (such as X*X
and X*Y
) or two or more nominal variables (such as A*B
, B*C
, and A*B*C
). You cannot cross a nominal variable with itself, but you can create crossed effects that involve both interval variables
and nominal variables, such as X*A
.
To specify a crossed effect in which each variable appears once (such as X*Y
):
For example, the preceding steps were used to create the X*Y
effect shown in Figure 23.7.
To cross variables with effects already in the model:
For example, Figure 23.7 shows one way to create the effect X*X*Y
. You can select the X
variable from the list and the X*Y
effect from the list. The X*X*Y
effect is created when you click .
The notation for a nested effect contains two parts. The first part is a main effect or crossed effect. The second part consists
of a classification variable or an interaction between classification variables. The second part is enclosed in parentheses.
The main effect or crossed effect is said to be "nested within" the effects in parentheses. For example, A(B*C)
means "effect A
is nested within the levels of the factors B
and C
." The value is ignored when you specify nested effects.
To create a nested effect, the effect outside the parentheses must already be specified in the
list.To create a nested effect:
Select one or more nominal variables from the
list. These variables will appear inside the parentheses.Select one or more effects from the
list. These variables will appear outside the parentheses. Make sure that the nominal variables selected in the list do not appear in any of the effects selected in the list.Click
, located to the right of the list.The effects in the
list are replaced with the nested effects.
For example, Figure 23.8 shows one way to create the effect A(B*C)
. Select the B and C variables from the list, and select the A main effect from the list. The A(B*C)
effect is created when you click . It replaces the A
effect that is currently in the list.
Factorial effects are k-way interactions between a set of variables.
To create factorial effects:
For example, Figure 23.9 shows how to create a full three-way factorial model with the variables A
, B
, and C
. The following effects are added to the list: A
, B
, C
, A*B
, A*C
, B*C
, and A*B*C
.
Interactions of an interval variable with itself are called polynomial effects. Each term is a monomial in one variable.
To create polynomial effects:
Select
from the list.Enter the
of the model. (The maximum degree is 10.)Select one or more variables from the
list.Click
.The polynomial effects are added to the
list. Any effects already in the model (for example, main effects) are highlighted, although their position in the list does not change.
For example, Figure 23.10 shows how to create all terms in a degree-three polynomial in the variable X
. The following effects are added to the list: X
, X*X
, and X*X*X
.
Multivariate polynomial effects are polynomial and interaction effects among a group of variables. If you select m variables and request effects from a degree-d multivariate polynomial, then each term is a multivariate monomial, with degree at most .
To create multivariate polynomial interaction effects:
Select
from the list.Enter the
of the model. (The maximum degree is 4.)Select one or more variables from the
list.Click
.The polynomial effects are added to the
list. Any effects already in the model (for example, main effects) are highlighted, although their position in the list does not change.
For example, Figure 23.11 shows how to create all main effects and valid two-way interactions among the three variables X
, Y
, and A
. The following effects are added to the list: X
, Y
, A
, X*X
, Y*Y
, X*Y
, X*A
, and Y*A
. The term A*A
is not created because A
is a classification variable.
You can reorder and remove effects in the
list. The order in which effects appear in the list is the order in which the effects appear in the MODEL statement of SAS/STAT procedures.
moves selected effects up one position in the list.
moves selected effects down one position in the list.
removes the selected effects from the list.
deletes all effects and then adds main effects to the list.