User Guide

Chapter
8
File Handlin
g and File
Transformations
Data files
are not always organized in the ideal form for your specific needs. You
may want to combine data files, sort the data in a different order, select a subset of
cases, or change the unit of analysis by grouping cases together. A wide range of file
transform
ation capabilities is available, including the ability to:
Sort data. You can sort cases based on the value of one or more variables.
Transpose cases an d variables. The SPSS data file format reads rows as cases and
columns a
s variables. For data files in which this order is reversed, you can switch the
rowsandcolumnsandreadthedatainthecorrectformat.
Merge files. You can merge two or more data files. You can combine files with the
same vari
ables but different cases or the same cases but different variables.
Select subsets of cases. You can restrict your analysis to a subset of cases or perform
simultaneous analyses on different subsets.
Aggregat
e data.
You can change the unit of analysis by aggregating cases based on the
value of one or more grouping variables.
Weight data. Weight cases for analysis based on the value of a weight variable.
Restruct
ure data.
You can restructure data to create a single case (record) from
multiple cases or create multiple cases from a single case.
Sort Cas
es
This dia
log box sorts cases (rows) of the data file based on the values of one or more
sorting variables. You can sort cases in ascending or descending order.
175