Section Two: Creating a dataset

 

When you first open SPSS, you will see a window asking you what you would like to do in SPSS.  To start creating your own dataset, select the "Type in data" option.

Opening SPSS

Figure 2.1

 

Once you click the 'OK' button, you will be given a blank data table.  Now, click on the Variable View tab located at the bottom left corner of the window. Here is where you will declare your variables.  You will notice that the column headers have changed.  The column headers should look like the headers in figure 2.2.

Variable view window

Figure 2.2

 

For the purposes of this tutorial, we will create a simple dataset with two variables.  The dataset will contain a list of people's height and gender.

To start entering your variables, type the name of the variable into the "Name" box. The default values are loaded into all the other boxes. To change the variable type, click the grey dotted area in the "Type" box. The window shown in figure 2.3 should open. This is where you can select the variable type. For our example we choose "Height" as a string and " Gender" as a numeric.

Variable types

Figure 2.3

 

You can assign values for a particular variable. To assign values, click the grey box in the "Values" box. The following window should pop up, where you can assign the values. Type in the value to be assigned in the "Value" box and the label in the "Value Label" box. Then click the "Add" button. When you have added all the labels, click "OK."  Here we have assigned the value 1 to "Male" and the value 2 to "Female."

Figure 2.4

 

Once you click "OK," the main screen should look like figure 2.5. The value types for the "Gender" variable have been loaded with the values we chose.

Figure 2.5

 

Now that we have declared our variables, we can start entering the data.  To add the data, click on the Data View tab located at the bottom left corner. The following window will appear, where you can add the data. The window will look as shown in Figure 2.6

Figure 2.6

 

Now you can start adding the data under the two columns.

Data Set

Figure 2.7

 

To save the given dataset, click on the File menu and choose Save. The following window will appear. Here you can choose the location of where you want to save the dataset. By default your file is saved in a ".sav" format.

Saving Data set

Figure 2.8