SPSS SPLIT FILE – A Quick Tutorial

SPLIT FILE is a command for having separate output for subsets of cases. It does not literally split your file into smaller files. Subsets are defined by the values on one or more split variables. After running SPLIT FILE, output is reported for each split group separately until you run SPLIT FILE OFF.SPSS Split File OutputExample of output split by education_type

SPSS Split File – Basic Use

Similarly to FILTER and WEIGHT, SPLIT FILE has three main commands.

  1. SPLIT FILE BY […]. switches it on or changes the variable(s) defining the groups of cases.
  2. SHOW SPLIT FILE. tells you which variable(s) define groups of cases.
  3. SPLIT FILE OFF. switches SPLIT FILE off.

SPSS Split File On
Status bar reports split file

SPSS Split File – Notes

  • Note that cases must be sorted by the split variable(s) before switching SPLIT FILE on.
  • When SPLIT FILE is in effect, the status bar informs you on this as shown in the screenshot. In older SPSS versions it simply says “Split File On” but in more recent versions it also indicates which variable(s) define the split groups.*
  • By default, output for the different split groups are shown as layers in tables. Alternatively, you can have output for separate groups as separate tables by using the SEPARATE keyword as we’ll demonstrate below.

SPSS Split File Example

We had our employees fill out a tiny questionnaire, the data of which are in employees.sav. We’d now like to explore these data separately for respondents with different education types. The syntax below gives and example of doing so by SPLIT FILE. It presumes you already have the data open.

SPSS Split File Syntax

*1. Sort cases before we can use split file.

sort cases by education_type.*2. Split file and organize output as separate tables.

split file separate by education_type.*3. Quick check.

show split file.

*4. Have a look at monthly_income.

descriptives monthly_income.

*5. Switch split file off.

split file off.