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
VARIABLESsubcommand 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
BYto separate the individual variables. - If all
METHODsubcommands are accompanied by independent variable lists, the keywordWITHand the list of independent variables may be omitted. - If the keyword
WITHis 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 theVARIABLESsubcommand is optional if you specify it on aMETHODsubcommand.
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
METHODis specified, all three single independent variables and the interaction term are entered into the model. -
LOGISTIC REGRESSIONproduces the default output.