Advanced variable definitions

You can create a new variable and specify the variable definition from scratch, rather than by starting from one or more existing variables.

Creating a new variable

Place the cursor in the Variables pane by selecting the variable after which you want the new variable to appear. If you are using hierarchical data, the position you select before creating the variable defines the level of the variable. For example, if you place the cursor in the Person loop, the new variable will be at the Person level.

From the menu, choose

Tip: You can also press Ctrl+M.

The New Variable dialog box appears.

Select the default name NewVar and change it to a meaningful name for your variable. Ensure that the variable name conforms to the IBM® SPSS® Data Collection Survey Reporter Naming Conventions.

A default description is displayed in a text box beneath the name. You can edit this to give the new variable a meaningful description.

Select a variable type for the new variable from the drop-down list.

Choose the Select button at the right of the Based on field. This displays the Create New Variable Based On dialog box, where you can enter the definition of the variable.

Choose OK to close the dialog box and return to the New Variable dialog box.

For categorical variables, indicate whether the variable is a single response or a multiple response variable by using the Number of Responses dialog box to specify how many responses can be recorded for a respondent. See the topic Setting the number of responses in a variable for more information.

Make any further edits to the variable using the features in the New Variable dialog box.

Choose Save and Close from the toolbar.

You can now use the new variable in your tables.