27.03.2013 Views

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SPLIT FILE<br />

SPLIT FILE {OFF }<br />

[{LAYERED }] {BY varlist}<br />

{SEPARATE}<br />

Example<br />

SORT CASES BY SEX.<br />

SPLIT FILE BY SEX.<br />

FREQUENCIES VARS=INCOME /STATISTICS=MEDIAN.<br />

Overview<br />

SPLIT FILE splits the working data file into subgroups that can be analyzed separately. These<br />

subgroups are sets of adjacent cases in the file that have the same values for the specified<br />

split variables. Each value of each split variable is considered a break group, and cases within<br />

a break group must be grouped together in the working data file. If they are not, the SORT<br />

CASES command must be used before SPLIT FILE to sort cases in the proper order.<br />

Basic Specification<br />

The basic specification is keyword BY followed by the variable or variables that define the<br />

split-file groups.<br />

• By default, the split-file groups are compared within the same table(s).<br />

• You can turn off split-file processing using keyword OFF.<br />

<strong>Syntax</strong> Rules<br />

• SPLIT FILE can specify both numeric and string split variables, including long string variables<br />

and variables created by temporary transformations. It cannot specify scratch or<br />

system variables.<br />

• SPLIT FILE is in effect for all procedures in a session unless you limit it with a TEMPORARY<br />

command, turn it off, or override it with a new SPLIT FILE or SORT CASES command.<br />

Operations<br />

• Unlike most transformations, SPLIT FILE takes effect as soon as it is encountered in the<br />

command sequence. Thus, special attention should be paid to its position among commands.<br />

For more information, see “<strong>Command</strong> Order” on p. 8 in Volume I.<br />

• The file is processed sequentially. A change or break in values on any one of the split<br />

variables signals the end of one break group and the beginning of the next.<br />

1533

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!