Creating a new file in SPSS
Before we get into the details of creating a file in SPSS, there are two views in SPSS. The data view (used for inputting data) and Variable View (used to input variables and their properties).
The SPSS program opens by default on the data view, you will see a blank spreadsheet in Data View. In case the program is already open with another dataset, but you want to create a new one, click File > New > Data to open a blank spreadsheet.
Once it is opened, the default look of SPSS is like a Microsoft Excel sheet, or better call it a spreadsheet with rows and columns. You will notice that each of the columns is labeled “var.” The column names represent the variables that you enter in your dataset (For most data especially collected using questionnaires, each question forms a variable). For the rows, each row is labeled with a number (“1,” “2,” and so on). The rows will represent cases(respondents) that will be a part of the dataset. When you enter values for your data in the spreadsheet cells, each value will correspond to a specific variable (column) and a specific case (row).
Steps to follow in creating a new file
Step 1: Variable View
While the program opens default in the Data view, click on the variable to navigate to the variable view.
Key properties of a variable
In SPSS, the properties of a variable are Name, Type, Width, Decimals, Label, Values, Missing, Columns, Align, Measure, and Role. The most important properties to take note of are the Name of the variable, Type, Values, and Measure for now. Type the name for your first variable under the Name column. In naming variables in SPSS, a few key points are worthy to note
- Names must be Unique
- A variable name can not start with a figure and other special characters like @#$%^^&
- Variables do not give room for space
- Names are case sensitive among others
You can also enter other information about the variable, such as the type (the default is “numeric”), width, decimals, label, etc. Type the name for each variable that you plan to include in your dataset. In this example, I will type “Gender” since I plan to include a variable for the gender of the respondent and I have coded Gender into two: 1 = Male, 2 = Female, and I will put the decimal into 0 given that I really don’t expect a half person (The default is two decimals.). Then from the codes, I will enter the values for the gender variable and classify it under Nominal (If you don’t know what nominal stands for, read on Level of Measurements. For the others, I will allow the default settings. They do not influence my analysis significantly at the basic level. If you can notice from the image, the variable view is active and highlighted yellow.
Step 2: Data View
Click the Data View tab. Any variable names that you entered in Variable View will now be included in the columns (one variable name per column). You can see that GENDER appears in the first column in this example.
Step 3: Data Entering
The data is entered for each participant or case. For example, lets assume we have 10 students, 4 boys and 6 girls. For each respondent, enter a value for their gender level in the cell that corresponds to the appropriate row and column. In this case, the first person’s data say a girl will be col1, row 1, and what appears after input will be Female. the second person is a boy and “1,” the third person is a boy “1,” the fourth person is a girl “2,” and so on.
In case your variable was not categorical (Nominal or Ordinal), you do not need to assign codes. In this case, the exact values are inputted. For example, if respondents provided their ages, you have to input the exact values. Let’s continue the input with our second variable Age(both data and variable views).
Repeat these steps for each variable that you will include in your dataset. Don’t forget to periodically save your progress as you enter data.
Inserting or Deleting Single Cases
Is not uncommon that you may need to add new cases or delete existing cases from your dataset. This could result from an observation that was forgotten or repeated and you want to delete it. For inserting, in that situation, you would refer to the original data collection materials and enter the missing case into the dataset (as well as the associated values for each variable in the dataset). Alternatively, you may realize that you have accidentally entered the same case in your dataset more than once and need to remove the extra case.
Inserting a Case
To insert a new case into a dataset:
- In Data View, click a row number or individual cell below where you want your new row to be inserted.
- You can insert a case in several ways:
- Click Edit > Insert Cases;
- Right-click on a row and select Insert Cases from the menu; or
- Click the Insert Cases icon ().
- A new, blank row will appear above the row or cell you selected. Values for each existing variable in your dataset will be missing (indicated by either a “.” or a blank cell) for your newly created case since you have not yet entered this information.
- Type in the values for each variable in the new case.
Deleting a Case
To delete an existing case from a dataset:
- In the Data View tab, click the case number (row) that you wish to delete. This will highlight the row for the case you selected.
- Press Delete on your keyboard, or right-click on the case number and select “Clear”. This will remove the entire row from the dataset.
Once your data is ready, you can start the analysis process. I hope you found this article useful. Share your thoughts!
- Opening a file
Data setup in SPSS
Reverse coding in SPSS
Selecting cases in SPSS
Splitting a file
Composite Variable (compute function)