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,
PRESORTEDmust precedeBREAK. The only specification is the keywordPRESORTED.PRESORTEDhas no additional specifications. - When
PRESORTEDis 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 ifPRESORTEDwere not specified. - When
PRESORTEDis specified, ifAGGREGATEis 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 theBREAKvariables.
Example
AGGREGATE OUTFILE=’/temp/temp.sav’
/PRESORTED
/BREAK=gender marital
/mean_age=MEAN(age).