Model Fitting: Logistic Regression

The Effects Tab

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:

  1. A nominal variable can appear in an effect at most once.
  2. 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.

Specifying Main Effects

The notation for a main effect is just the name of the variable itself. To specify a main effect, do the following:

  1. Select Main from the Standard Effects list.
  2. Select one or more variables from the Explanatory Variables list.
  3. Click Add.

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.

ugfitlogisticeffectsmain.png (10090 bytes)

Figure 23.6: Specifying Main Effects

Specifying Crossed 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:

  1. Select Cross from the Standard Effects list.
  2. Select two or more variables from the Explanatory Variables list.
  3. Click Add.
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, do the following:

  1. Select Cross from the Standard Effects list.
  2. Select one or more variables from the Explanatory Variables list.
  3. Select one or more effects from the Effects in Model list.
  4. Click Cross, located to the right of the Effects in Model list.

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.

ugfitlogisticeffectscross.png (10207 bytes)

Figure 23.7: Specifying Crossed Effects

Specifying Nested 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:

  1. Select one or more nominal variables from the Explanatory Variables list. These variables will appear inside the parentheses.
  2. Select one or more effects from the Effects in Model list. These variables will appear outside the parentheses. Make sure that the nominal variables selected in the Explanatory Variables list do not appear in any of the effects selected in the Effects in Model list.
  3. Click Nest, located to the right of the Effects in Model list.
  4. The effects in the Effects in Model 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 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.

ugfitlogisticeffectsnest.png (10030 bytes)

Figure 23.8: Specifying Nested Effects

Specifying Factorial Effects

Factorial effects are k-way interactions between a set of variables. To create factorial effects, do the following:

  1. Select Factorial from the Standard Effects list.
  2. Enter the Degree of the model.
  3. Select two or more variables from the Explanatory Variables list.
  4. Click Add.
  5. The factorial effects are added to the Effects in Model list. Any effects already in the model (for example, main effects) are highlighted, although their position in the Effects in Model list does not change.

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.

ugfitlogisticeffectsfactorial.png (10800 bytes)

Figure 23.9: Specifying Factorial Interaction Effects

Specifying Polynomial 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:

  1. Select Polynomial from the Standard Effects list.
  2. Enter the Degree of the model. (The maximum degree is 10.)
  3. Select one or more variables from the Explanatory Variables list.
  4. Click Add.
  5. The polynomial effects are added to the Effects in Model list. Any effects already in the model (for example, main effects) are highlighted, although their position in the Effects in Model 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 Effects in Model list: X, X*X, and X*X*X.

ugfitlogisticeffectspolynomial.png (10455 bytes)

Figure 23.10: Specifying Polynomial Effects

Specifying Multivariate Polynomial Effects

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 \min(k,d).

To create multivariate polynomial interaction effects, do the following:

  1. Select Multivariate Polynomial from the Standard Effects list.
  2. Enter the Degree of the model. (The maximum degree is 4.)
  3. Select one or more variables from the Explanatory Variables list.
  4. Click Add.
  5. The polynomial effects are added to the Effects in Model list. Any effects already in the model (for example, main effects) are highlighted, although their position in the Effects in Model 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 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.

ugfitlogisticeffectsmultivariate.png (10981 bytes)

Figure 23.11: Specifying Polynomial Interaction Effects

Reordering 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.

Move Up
moves selected effects up one position in the Effects in Model list.
Move Down
moves selected effects down one position in the Effects in Model list.
Remove
removes the selected effects from the Effects in Model list.
Reset
deletes all effects and then adds main effects to the Effects in Model list.

Previous Page | Next Page | Top of Page