PRESORTED Subcommand (AGGREGATE command)
If the data are already sorted into the desired
groups, you can reduce run time and memory requirements by using the PRESORTED
subcommand.
- If specified,
PRESORTED
must precedeBREAK
. The only specification is the keywordPRESORTED
.PRESORTED
has no additional specifications. - When
PRESORTED
is specified, the program forms an aggregate case out of each group of adjacent cases with the same values for the break variables. Unless the cases are sorted by the break variables, the results will be quite different from what would be produced ifPRESORTED
were not specified. - When
PRESORTED
is specified, ifAGGREGATE
is appending new variables to the active dataset rather than writing a new file or replacing the active dataset, the cases must be sorted in ascending order by theBREAK
variables.
Example
AGGREGATE OUTFILE=’/temp/temp.sav’
/PRESORTED
/BREAK=gender marital
/mean_age=MEAN(age).