Model Fitting: Logistic Regression |
You can use the Effects tab to add several different types of effects to your model. specifying All effects appear in the Effects in Model list. You can specify the following types of 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:
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, do the following:
The effects are added to the Effects in Model list, as shown in Figure 23.6. Each main effect appears on a line by itself in the Effects in Model 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.
Figure 23.6: Specifying Main Effects
The notation for a crossed effect is two or more variable names joined with 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 for 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), do the following:
To cross variables with effects already in the model, do the following:
For example, Figure 23.7 shows one way to create the effect X*X*Y. You can select the X variable from the Explanatory Variables list and the X*Y effect from the Effects in Model list. The X*X*Y effect is created when you click Cross.
Figure 23.7: Specifying Crossed Effects
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 Standard Effects value is ignored when you specify nested effects.
To create a nested effect, the effect outside the parentheses must already be specified in the Effects in Model list. To create a nested effect, do the following:
For example, Figure 23.8 shows one way to create the effect A(B*C). Select the B and C variables from the Explanatory Variables list, and select the A main effect from the Effects in Model list. The A(B*C) effect is created when you click Nest. It replaces the A effect that is currently in the list.
Figure 23.8: Specifying Nested Effects
Factorial effects are -way interactions between a set of variables. To create factorial effects, do the following:
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 Effects in Model list: A, B, C, A*B, A*C, B*C, and A*B*C.
Figure 23.9: Specifying Factorial Interaction Effects
Interactions of an interval variable with itself are called polynomial effects. Each term is a monomial in one variable. To create polynomial effects, do the following:
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 Effects in Model list: X, X*X, and X*X*X.
Figure 23.10: Specifying Polynomial Effects
Multivariate polynomial effects are polynomial and interaction effects among a group of variables. If you select variables and request effects from a degree- multivariate polynomial, then each term is a multivariate monomial, with degree at most .
To create multivariate polynomial interaction effects, do the following:
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 Effects in Model 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.
Figure 23.11: Specifying Polynomial Interaction Effects
You can reorder and remove effects in the Effects in Model list. The order that effects appear in the list is the order in which the effects appear in the MODEL statement of SAS/STAT procedures.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.