How to perform Select Cases in SPSS
Sometimes you may be interested in analyzing the specific part (subpart) of the available dataset. For example, you may be interested to get descriptive or inferential statistics for males and females separately. One may also be interested in a certain age range or may want to study (say) only non-smokers. In such cases, one may use a select case option in SPSS.
Example and Step by Step procedure
For illustrative purposes, I am using the “customer_dbase” file available in SPSS sample data files. I am assuming the gender variable to select male customers only and will present some descriptive statistics only males. For this purpose follow these steps:
Step 1: Go to the Menu bar, select “Data” and then “Select Cases”.
Step 2: A new window called “Select Cases” will open.
Step 3: Tick the box called “If condition is satisfied” as shown in the figure below.
Step 4: Click on the button “If” highlighted in the above picture.
Step 5: A new window called “Select Cases: If” will open.
Step 6: The left box of this dialog box contains all the variables from the data view. Choose the variable (using the left mouse button) that you want to select cases for and use the “arrow” button to move the selected variable to the right box.
Step 7: In this example, the variable gender (for which we want to select only men) is shifted from the left to the right box. In the right box, write “gender=0” (since men have the value 0 code in this dataset).
Step 8: Click on Continue and then the OK button. Now, only men are selected (and the women’s data values are temporarily filtered out from the dataset).
Note: To “re-select” all cases (complete dataset), you carry out the following steps:
Step a: Go to the Menu bar, choose “Data” and then “Select Cases”.
Step b: From the dialog box of “Select Cases”, tick the box called “All cases”, and then click on the OK button.
When you use the select cases tool in SPSS, a new variable called “filter” will be created in the dataset. Deleting this filter variable, the selection will disappear. The “un-selected” cases are crossed over in the data view windows.
Note: The selection will be applied to everything you do from the point you select cases until you remove the selection. In other words, all statistics, tables, and graphs will be based only on the selected individuals until you remove (or change) the selection.
There is another kind of selection too. For example, the random sample of cases, based on time or case range, and use the filter variable. The selected case can be copied to a new dataset or unselected cases can be deleted. For this purpose choose the appropriate option from the output section of the select cases dialog box.
For other SPSS tutorials Click the links below