Creating a Dataset
Upon opening SPSS, the main window will appear.
To create a dataset, select the Type in data radio button, and click OK.
A new dataset will be created, and you will be taken automatically to Variable View. The various columns are for specification of particular variables, which are entered starting with the first row. From here, you can begin entering variables for your dataset.
Enter the name of each variable under the Name column, and press Tab. This will cause the rest of the fields to propagate in accordance with the default settings. For the purpose of this tutorial, we will create a sample dataset with two variables: the first variable will be (1) height, and the second (2) sex. Click on the first cell under the Name column, and enter “Height.” Press Tab, and then click on the second cell under the Name column, entering the variable “Height.” Press Tab again. Now the names of your variables have been successfully entered.
Assigning Value Labels for Variables
Now you may enter the value labels for your variables. In this instance, there are two values under the variable “sex,” namely “male” and “female.” In assigning a value label, as the name implies, we are simply associating a label (i.e., “male” or “female”) to a particular value (i.e., “1” or “2”). This is similar to how such values might appear on a survey:
|(1) Height (enter in inches): ______
(2) Sex (circle “1” or “2”):
In the above example, under the second (2) variable “Sex,” the value “1” is assigned the value label “Male,” while the value “2” is assigned the value label “Female.”
To assign values for a particular variable, click on the cell under the Values column, corresponding to the variable’s row. Then, click on the grey box in the right-hand corner of the cell.
A window will appear, prompting you to enter the value and the value label. For the first value label, enter “1” in the value field, and then the first label (in this case “Male”) in the value label field. For the second value label, enter “2” in the value field, entering the second label (in this case “Female”) in the value label field.
After you have finished entering all your value labels, click OK. After returning to the main screen, your Variable View should look like Fig. 2-7 below.
Now that the value labels for the variable “Sex” have been properly assigned, we can begin entering our data by returning to the Data View. You can do this by clicking on the Data View tab at the bottom left-hand corner of your screen.
After clicking on the Data View tab, you will return to the same screen that appeared when you first opened the program, except now instead of the first and second columns having the heading “var,” they will have as headings “Height” and “Sex” respectively.
Now you can begin entering your data. In this example dataset, we are entering our data in inches under the first column, and the values “1” and “2” for “Male” and “Female” under the second column.
Saving a Dataset
Now that you have entered your data, you can save your dataset.
Opening the File menu, click on Save.
Navigate to the location where you want to save your dataset, and then click on the Save button.
Once the document has been sucessfully saved, the output window will appear, as above.
Creating a Dataset