Summary print formats (REPORT command)
All functions have default formats that are used to display results. You can override these defaults by specifying a format keyword and/or the number of decimal places.
- Any printable formats or the
PLAINkeyword can be specified. Format specifications must be enclosed in parentheses. - For aggregate functions, the format and/or number of decimal places is specified after the variable name, within the parentheses that enclose the variable name. The variable must be explicitly named as an argument.
- For composite functions, the format and/or number of decimal places is specified after the variable name of the column location, within the parentheses that enclose the variable name. The column location must be explicitly specified.
- If the report column is wide enough,
SUM,MEAN,STDDEV,MIN,MAX,MEDIAN,MODE, andVARIANCEuseDOLLARorCOMMAformat if aDOLLARorCOMMAformat has been declared for the variable on either theFORMATSorPRINT FORMATScommand. - If the column is not wide enough to display the decimal
digits for a given function,
REPORTdisplays fewer decimal places. If the column is not wide enough to display the integer portion of the number,REPORTuses scientific notation if possible, or, if not, displays asterisks. - An exact value of 0 is displayed with one 0 to the
left of the decimal point and as many 0 digits to the right as specified
by the format. A number less than 1 in absolute value is displayed
without a 0 to the left of the decimal point, except with
DOLLARandCOMMAformats.
(PLAIN). Uses the setting
on SET DECIMAL for the thousands separator and decimal delimiter. PLAIN overrides dictionary
formats. This is the default for all functions except SUM, MEAN, STDDEV, MIN, MAX, MEDIAN, MODE, and VARIANCE. For these functions, the default is the dictionary format of the
variable for which the function is computed.
(d). Number of decimal places.
Example
/SUMMARY=MEAN(INCOME (DOLLAR)(2))
ADD(SUM(INCOME)SUM(WEALTH)) (WEALTH(DOLLAR(2))
-
SUMMARYdisplays the mean of INCOME with dollar format and two decimal places. The result is displayed in the INCOME column. - The sums of INCOME and WEALTH are added, and the result is displayed in the WEALTH column with dollar format and two decimal places.
| Function | Format type | Width | Decimal places |
|---|---|---|---|
VALIDN |
F | 5 | 0 |
SUM |
Dictionary | Dictionary + 2 | Dictionary |
MEAN |
Dictionary | Dictionary | Dictionary |
STDDEV |
Dictionary | Dictionary | Dictionary |
VARIANCE |
Dictionary | Dictionary | Dictionary |
MIN |
Dictionary | Dictionary | Dictionary |
MAX |
Dictionary | Dictionary | Dictionary |
SKEWNESS |
F | 5 | 2 |
KURTOSIS |
F | 5 | 2 |
PGT |
PCT | 6 | 1 |
PLT |
PCT | 6 | 1 |
PIN |
PCT | 6 | 1 |
MEDIAN |
Dictionary | Dictionary | Dictionary |
MODE |
Dictionary | Dictionary | Dictionary |
PERCENT |
F | 6 | 1 |
FREQUENCY |
F | 5 | 0 |
DIVIDE |
F | Dictionary | 0 |
PCT |
PCT | 6 | 2 |
SUBTRACT |
F | Dictionary | 0 |
ADD |
F | Dictionary | 0 |
GREAT |
F | Dictionary | 0 |
LEAST |
F | Dictionary | 0 |
AVERAGE |
F | Dictionary | 0 |
MULTIPLY |
F | Dictionary | 0 |
Where DATE formats are specified, functions with the dictionary format type
display the DATE formats, using
the column width as the display width.