⇤ ← Revision 1 as of 2023-01-13 23:32:12
Size: 1244
Comment:
|
Size: 1179
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
The '''`AGGREGATE`''' command computes descriptive statistics. |
|
Line 16: | Line 18: |
The new variable `Total_Sales` is implicitly created using the `Sales` variable and the `sum` function. See [[SPSS/AggregateFunctions|here]] for the list of available `AGGREGATE` functions. |
See [[SPSS/Aggregate/Functions|here]] for the list of available `AGGREGATE` functions. |
Line 26: | Line 26: |
Note that omitting a `/BREAK` subcommand is unsupported in PSPP, and unsupported in SPSS version 16 or earlier. | Note that omitting a `/BREAK` subcommand is unsupported in SPSS version 16 or earlier. |
SPSS Aggregate
The AGGREGATE command computes descriptive statistics.
Contents
Usage
aggregate outfile=* mode=addvariables /Total_Sales = sum(Sales).
See here for the list of available AGGREGATE functions.
Break
The /BREAK subcommand specifies one or more variables to split aggregation.
Note that omitting a /BREAK subcommand is unsupported in SPSS version 16 or earlier.
Presorted
If the dataset is already sorted by all variables specified on the /BREAK subcommand, use the /PRESORTED subcommand to skip re-sorting. The /PRESORTED subcommand must precede the /BREAK subcommand.
Outfile and Mode
The default behavior is OUTFILE=* and MODE=ADDVARIABLES (i.e. modify the active dataset in-place and add variables to it).
To instead populate a new dataset, try:
sort cases by VARLIST. dataset declare DUPLICATES. aggregate /outfile="DUPLICATES" /presorted /break=VARLIST /COUNT=N. execute. dataset activate DUPLICATES. select if COUNT>1.