Split File
Split File splits the active dataset into subgroups that can be analyzed separately. Note that the file stays intact. The subgroups are sets of adjacent cases in the file that have the same values for the split variable or variables.
Note
In order for Split File to work correctly, cases must be sorted by the values of the split variable or variables. Split File can be an efficient alternative to the repeated invocation of Select If
when you are interested in repeating the same analysis in each level of a split variable.
As an example, we will contrast the running of Descriptives
on several numeric variables without and with Split File in effect. As the splitting variable, we will use VOTE12
, which indicates whether or not the respondent voted in the 2012 US Presidential Election.
First, here are Descriptive Statistics
for several numeric variables from the small GSS2016
file:

Here is the Split Files
syntax for the compare groups
output option, followed by the Descriptives
specification...