MODEL Subcommand (NOMREG command)

The MODEL subcommand specifies the effects in the model.

  • The MODEL and the FULLFACTORIAL subcommands are mutually exclusive. Only one of them can be specified at any time.
  • If more than one MODEL subcommand is specified, only the last one is in effect.
  • Specify a list of terms to be included in the model, separated by commas or spaces. If the MODEL subcommand is omitted or empty, the default model is generated. The default model contains: first, the intercept (if included); second, all of the covariates (if specified), in the order in which they are specified; and next, all of the main factorial effects, in the order in which they are specified.
  • If a SUBPOP subcommand is specified, then effects specified in the MODEL subcommand can only be composed using the variables listed on the SUBPOP subcommand.
  • To include a main-effect term, enter the name of the factor on the MODEL subcommand.
  • To include an interaction-effect term among factors, use the keyword BY or the asterisk (*) to join factors involved in the interaction. For example, A*B*C means a three-way interaction effect of A, B, and C, where A, B, and C are factors. The expression A BY B BY C is equivalent to A*B*C. Factors inside an interaction effect must be distinct. Expressions such as A*C*A and A*A are invalid.
  • To include a nested-effect term, use the keyword WITHIN or a pair of parentheses on the MODEL subcommand. For example, A(B) means that A is nested within B, where A and B are factors. The expression A WITHIN B is equivalent to A(B). Factors inside a nested effect must be distinct. Expressions such as A(A) and A(B*A) are invalid.
  • Multiple-level nesting is supported. For example, A(B(C)) means that B is nested within C, and A is nested within B(C). 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.
  • Nesting within an interaction effect is valid. For example, A(B*C) means that A is nested within B*C.
  • Interactions among nested effects are allowed. The correct syntax is the interaction followed by the common nested effect inside the parentheses. For example, interaction between A and B within levels of C should be specified as A*B(C) instead of A(C)*B(C).
  • To include a covariate term in the model, enter the name of the covariate on the MODEL subcommand.
  • Covariates can be connected, but not nested, using the keyword BY or the asterisk (*) operator. For example, X*X is the product of X and itself. This is equivalent to a covariate whose values are the square of those of X. However, X(Y) is invalid.
  • Factor and covariate effects can be connected in many ways. No effects can be nested within a covariate effect. Suppose A and B are factors, and X and Y are covariates. Examples of valid combination of factor and covariate effects are A*X, A*B*X, X(A), X(A*B), X*A(B), X*Y(A*B), and A*B*X*Y.
  • A stepwise method can be specified by following the model effects with a vertical bar (|), a stepwise method keyword, an equals sign (=), and a list of variables (or interactions or nested effects) for which the method is to be used.
  • If a stepwise method is specified, then the TEST subcommand is ignored.
  • If a stepwise method is specified, then it begins with the results of the model defined on the left side of the MODEL subcommand.
  • If a stepwise method is specified but no effects are specified on the left side of the MODEL subcommand, then the initial model contains the intercept only (if INTERCEPT = INCLUDE) or the initial model is the null model (if INTERCEPT = EXCLUDE).
  • The intercept cannot be specified as an effect in the stepwise method option.
  • For all stepwise methods, if two effects have tied significance levels, then the removal or entry is performed on the effect specified first. For example, if the right side of the MODEL subcommand specifies FORWARD A*B A(B), where A*B and A(B) have the same significance level less than PIN, then A*B is entered because it is specified first.

The available stepwise method keywords are:

BACKWARD. Backward elimination. As a first step, the variables (or interaction effects or nested effects) specified on BACKWARD are entered into the model together and are tested for removal one by one. The variable with the largest significance level of the likelihood-ratio statistic, provided that the value is larger than POUT, is removed, and the model is reestimated. This process continues until no more variables meet the removal criterion or when the current model is the same as a previous model.

FORWARD. Forward entry. The variables (or interaction effects or nested effects) specified on FORWARD are tested for entry into the model one by one, based on the significance level of the likelihood-ratio statistic. The variable with the smallest significance level less than PIN is entered into the model, and the model is reestimated. Model building stops when no more variables meet the entry criteria.

BSTEP. Backward stepwise. As a first step, the variables (or interaction effects or nested effects) specified on BSTEP are entered into the model together and are tested for removal one by one. The variable with the largest significance level of the likelihood-ratio statistic, provided that the value is larger than POUT, is removed, and the model is reestimated. This process continues until no more variables meet the removal criterion. Next, variables not in the model are tested for possible entry, based on the significance level of the likelihood-ratio statistic. The variable with the smallest significance level less than PIN is entered, and the model is reestimated. This process repeats, with variables in the model again evaluated for removal. Model building stops when no more variables meet the removal or entry criteria or when the current model is the same as a previous model.

FSTEP. Forward stepwise. The variables (or interaction effects or nested effects) specified on FSTEP are tested for entry into the model one by one, based on the significance level of the likelihood-ratio statistic. The variable with the smallest significance level less than PIN is entered into the model, and the model is reestimated. Next, variables that are already in the model are tested for removal, based on the significance level of the likelihood-ratio statistic. The variable with the largest probability greater than the specified POUT value is removed, and the model is reestimated. Variables in the model are then evaluated again for removal. Once no more variables satisfy the removal criterion, variables not in the model are evaluated again for entry. Model building stops when no more variables meet the entry or removal criteria or when the current model is the same as a previous one.

Examples

NOMREG y BY a b c
/INTERCEPT = INCLUDE
/MODEL = a b c | BACKWARD = a*b a*c b*c a*b*c.
  • The initial model contains the intercept and main effects a, b, and c. Backward elimination is used to select among the two- and three-way interaction effects.
    NOMREG y BY a b c
    /MODEL = INTERCEPT | FORWARD = a b c.
  • The initial model contains the intercept. Forward entry is used to select among the main effects a, b, and c.
    NOMREG y BY a b c
    /INTERCEPT = INCLUDE
    /MODEL = | FORWARD = a b c.
  • The initial model contains the intercept. Forward entry is used to select among the main effects a, b, and c.
    NOMREG y BY a b c
    /INTERCEPT = EXCLUDE
    /MODEL = | BSTEP = a b c.
  • The initial model is the null model. Backward stepwise is used to select among the main effects a, b, and c.
    NOMREG y BY a b c
    /MODEL = | FSTEP =.
  • This MODEL specification yields a syntax error.