Last modified on 24 July 2014, at 17:36

Using SPSS and PASW/Creating New Variables

The previous page shows how to create a new variable by transform an existing one. In this exegesis we will show you how to create entirely new variables.

Creating a new variable is a foundational skill for users of SPSS, it is necessary to perform the statistical tests and procedures to be covered later.

Step one is switching the Data Editor window to “Variable View” by clicking on the latter tab:

11creatingnewvariables01.png

Then click in the first empty row and provide your nascent variable with a name, e.g., “Age”:

11creatingnewvariables03.png

You can specify the type of the variable by clicking in the cell under the column labeled “Type.” An ellipsis will appear:

11creatingnewvariables04.png

Click on the ellipsis to open the Variable Type Dialog box, which looks like this:

11creatingnewvariables05.png

Most variables will be “Numeric,” meaning there will be a number used, either because the number itself is meaningful (interval/ratio variables) or because it represents distinct categories. Other common variable types are String, for text, and Date and Currency. Select as desired and click OK.

Next, you can input a label for your variable, which is a description of the variable, as we've seen:

11creatingnewvariables06.png

You can also assign values for the different categories of the variable. This is particularly useful for nominal and ordinal variables for which you assign a unique number to each category (e.g., for race you may have: 1=white, 2=black, 3=Native American, etc.) To access the values option, click on the cell under the “Value” column and an ellipsis will appear. Click on the ellipsis and enter your values and value labels in the “Value Label” dialog box:

11creatingnewvariables07.png

Next you will need to specify the values of any missing values you may have. It is generally a good idea when using any statistical program to include a Value for cases where people did not respond. This Values should be included in the Value Labels, but should also be included in the “Missing” column as it will prevent SPSS from attempting to use those values in calculations. To add these values to the list of Missing Values, click on the cell in the “Missing” column. Click on the ellipsis that appears in order to access the “Missing Values” dialog box:

11creatingnewvariables08.png

While there are no right or wrong values to assign for missing data, it is common to uses iterations of 9. For instance, if a variable has 4 categories (1, 2, 3, and 4) and missing values, you can assign a “9” to indicate that the value is missing for that person. If there are 20 categories, you could use “99.” If there are 200 categories, you could use “999,” and so on. This is a widespread practice, but not mandatory. You could choose a different system to indicate missing values.

Finally, you must specify your level of measurement. This may be done by clicking on the cell under the column labeled “Measure” and choosing from Nominal, Ordinal, and Scale. Nominal and ordinal variables should be labeled under their corresponding names, while interval and ratio variables should be labeled as “Scale.”

11creatingnewvariables09.png

Repeat this process for as many variables as you need to create and/or define.

Chapter contributed by Damian Patrinostro.