We hope you now have a decent understanding of how the Variable View works in SPSS, and how you go about defining a variable. Select scale if your values are numerical, where each interval (for instance, 1 metre, 1 second, 1 inch) is the same size, no matter where it is located on the scale.
Choose ordinal data if your values are a series of ranks, such as in the case of a motor racing result (first, second, third, fourth) or class standing. Select nominal if your values are categories (for example, sex, religion, disease, social class, species). SPSS specifies three levels of measurement, nominal, ordinal or scale. This parameter relates to the level of measurement of your data. You can left justify, right justify or centre the data values within a column. This parameter relates to the alignment of values in the Data View grid. To increase or decrease the size of the column, click up or down on the arrow icon. This parameter relates to the width of the column in the Data View grid. We’ve entered 999, because nobody is 999 years old. Select “Discrete missing values”, and input a value that doesn’t conflict with the data in your data set. Click on the ellipsis, and the following dialog box will appear.
To set a code for missing values, click in a cell within the “Missing” column (the cell row should correspond to the variable for which you wish to code missing values). You might get missing values if people refuse to answer a particular question on a questionnaire. This parameter allows you to specify a code for missing values. This is a slightly complex issue, so it’s dealt with in a separate tutorial, which you should check out. To add a label, click inside a cell within the Label column, and type in the value. For example, if you give the Age variable a label “Age Status”, then “Age Status” will appear on charts, graphs and tables. Label allows you to choose the text that is displayed in any SPSS output. This parameter relates to the number of digits or characters that are displayed for a particular variable within its column in the Data View. Select the variable type you require and click OK. If you need to change the type, click inside the cell you want to change (within the Type column, click again on the ellipsis if it appears), and a list of variable types will be displayed (as below). In our example, SPSS has correctly identified Age as a numeric type. Type specifies the type of a variable, such as numeric, string, data, date, and so on. Here are the other parameters that can be specified and changed within the Variable View.
You now know how to change the Name and Decimals parameters. If you click back to the Data View, you’ll see that things already look much better. You can also change the number of decimal places that are displayed in the Data View by clicking in the first cell of the Decimals column, and changing 2 to 0. To change the name of our variable to something meaningful, just click where it currently says VAR00001, and replace it with “Age”. At the moment, we only have one variable, so there’s only one row. And each row corresponds to a variable in the Data View. If you click on the Variable View tab, you’ll get a screen that looks like this.Įach column (Name, Type, Width, etc) represents a parameter of the variable. It’s possible to sort out both of these problems by switching to the Variable View (click the tab, as per the screenshot above), and specifying some of the parameters associated with the age variable. The variable name is not informative (VAR00001) and the ages have decimal points. You can immediately see there’s a problem. Let’s set up a variable for age by typing in five different ages (see screenshot below). Select the Data View – click on the tab at the bottom of the program window – start in the first cell of an empty column, and work downwards. In order to define a variable and set its parameters you need to get some data into SPSS. This tutorial will introduce you to the Variable View tab in SPSS, and teach you how to define variables – that is, specify their various parameters – within this view.