Generate terms and Write terms

Generate terms

Use this option when you want to include non-nested terms of a certain type (such as main effects) for all combinations of a selected set of factors and covariates.

  1. On the Model dialog, select Generate terms as the method for building the terms.

    The following settings are available in the Generate terms dialog:

    Type
    The drop-down menu provides the following options:
    Main effects
    Creates a main-effects term for each variable selected.
    Interaction
    Creates the highest-level interaction term of all selected variables. This is the default.
    All 2-way
    Creates all possible two-way interactions of the selected variables.
    All 3-way
    Creates all possible three-way interactions of the selected variables.
    All 4-way
    Creates all possible four-way interactions of the selected variables.
    All 5-way
    Creates all possible five-way interactions of the selected variables.
  2. Select one or more factor or covariate variables or a combination of factor and covariate variables.
  3. Repeat the process until you have all of the terms that you want in the model.
  4. Click OK when finished.

A generating class is a list of the highest-order terms in which factors appear. A hierarchical model contains the terms that define the generating class and all lower-order relatives. Suppose you select variables A, B, and C in the Generate Terms dialog and then select Interaction from the Type drop-down list. The resulting model will contain the specified 3-way interaction A*B*C, the 2-way interactions A*B, A*C, and B*C, and main effects for A, B, and C. Do not specify the lower-order relatives in the generating class.

Write terms

Use this choice when you want to include nested terms or when you want to explicitly build any term variable by variable. Building a nested term involves the following steps:

  1. On the Model dialog, select Write terms as the method for building the terms.
  2. Select a factor or covariate variable that is nested within another factor.
  3. Click Within.
  4. Select the factor variable within which the previous factor or covariate variable is nested.
  5. Optionally, you can include interaction effects by using By*, or you can add multiple levels of nesting to the nested term.
  6. Click OK when finished.