Overview (VARIABLE ROLE command)

Some dialogs support predefined roles that can be used to pre-select variables for analysis. When you open one of these dialogs, variables that meet the role requirements will be automatically displayed in the destination list(s). Available role subcommands are:

Input. The variable will be used as an input (e.g., predictor, independent variable).

Target. The variable will be used as an output or target (e.g., dependent variable).

Both. The variable will be used as both input and output.

None. The variable has no role assignment.

Partition. The variable will be used to partition the data into separate samples for training, testing, and validation.

Split. Included for round-trip compatibility with IBM® SPSS® Modeler. Variables with this role are not used as split-file variables in IBM SPSS Statistics.

  • By default, all variables are assigned the Input role. This includes data from external file formats and data files from versions of IBM SPSS Statistics prior to version 18.
  • Role assignment only affects dialogs that support role assignment. It has no effect on command syntax.

Basic Specification

The basis specification is the command name, at least one subcommand, and at least one variable specified on that subcommand.

Syntax Rules

  • At least one subcommand must be specified.
  • Only a single instance of each subcommand is allowed.
  • Each subcommand must be preceded by a forward slash.
  • Each subcommand must specify at least one variable.
  • The command name and subcommand names must be spelled in full.
  • Keyword ALL can be used to specify all variables in the active dataset, and keyword TO can be used to specify a list of variables (in file order).

Operations

  • If a variable is specified more than once, the last role assignment is used.
  • This command takes effect immediately. It does not read the active dataset or execute pending transformations.

Example

VARIABLE ROLE
  /INPUT Age Income Gender Education Debt
  /TARGET Credit_rating  /NONE Customer_ID.