How to Filter in SPSS

By Shane Hall

When working with large sets of statistical data, analysts may wish to narrow the scope of their study by focusing only on particular cases based on certain selection criteria. SPSS -- a statistical software program used by researchers in social sciences, business and education -- allows you to do this by applying filters that select cases for analysis based on the filtering criteria you specify. This function allows you to analyze only the cases you want to examine.

Step 1

Open SPSS and the data file you want to filter by double-clicking the data file name or the SPSS icon on your computer desktop. Alternatively, you can select it from the "Programs" menu in your operating system. This opens the SPSS Data Editor, a spreadsheet-like grid that will display your data.

Step 2

Click the "Data" menu at the top of the SPSS Data Editor. Choose "Select Cases," which opens a dialog box to guide you through the rest of the case selection and filtering process. The dialog box displays a series of radio buttons. The button "All cases" should be selected, meaning that all cases in your data file are selected for analysis.

Step 3

Click the appropriate radio button that will specify which data to select for your analysis. You can select a random sample of cases by clicking that radio button, or choose a range of cases by internal case number or the row number on the Data Editor. For example, you could select the first 10 rows for analysis. You also can select only those cases that satisfy a certain condition based on the value of a selected variable. To do this, click the radio button "If condition is satisfied," which opens a new dialog box for defining cases to select for analysis.

Step 4

Select the variable on which you wish to filter your data. A box on the left of the dialog box shows the variables you can select. Click the variable you want to filter on, and then move it to the right-hand box by clicking the arrow. Specify the desired value by typing "=" followed by the value. For example, suppose you have a variable "gender" coded "1" for women and "2" for men. If you want to analyze only the women in the data, type "= 1."

Step 5

After selecting your filtering criteria, ensure that the radio button at the bottom of the "Select Cases" menu shows that unselected cases will be filtered rather than deleted. If "Deleted" is chosen, click "Filtered" to prevent loss of unselected data. Click "OK." The Data Editor screen appears, and the unselected cases will have a slash through the row number.

Step 6

Begin your analysis of the selected cases in your data set. To remove the filter later, go back to "Select Cases," and then choose the "All cases" radio button.