VARIABLES Subcommand (LOGISTIC REGRESSION command)

VARIABLES specifies the dependent variable and, optionally, all independent variables in the model. The dependent variable appears first on the list and is separated from the independent variables by the keyword WITH.

  • One VARIABLES subcommand is allowed for each Logistic Regression procedure.
  • The dependent variable must be dichotomous—that is, it must have exactly two values other than system-missing and user-missing values for each split-file group.
  • The dependent variable may be a string variable if its two values can be differentiated by their first eight characters.
  • You can indicate an interaction term on the variable list by using the keyword BY to separate the individual variables.
  • If all METHOD subcommands are accompanied by independent variable lists, the keyword WITH and the list of independent variables may be omitted.
  • If the keyword WITH is used, all independent variables must be specified. For interaction terms, only the individual variable names that make up the interaction (for example, X1, X2) need to be specified. Specifying the actual interaction term (for example, X1 BY X2) on the VARIABLES subcommand is optional if you specify it on a METHOD subcommand.

Example

LOGISTIC REGRESSION VARIABLES = PROMOTED WITH AGE,JOBTIME,JOBRATE,
    AGE BY JOBTIME.
  • PROMOTED is specified as the dependent variable.
  • AGE, JOBTIME, JOBRATE, and the interaction AGE by JOBTIME are specified as the independent variables.
  • Because no METHOD is specified, all three single independent variables and the interaction term are entered into the model.
  • LOGISTIC REGRESSION produces the default output.