TALLY procedure
Forms a simple tally table of the distinct values in a vector (D.B. Baird & R.D. Stern).
Options
Parameters
Description
TALLY forms a simple tally table of a vector, giving the counts, percentages, and cumulative counts and percentages of each distinct value. These may be printed or saved. The number of classes in the tally table may be reduced for a variate or text by specifying the NGROUPS or DECIMALS options, or the LIMITS parameter. These work exactly as in the GROUPS directive. If limits are specified the BOUNDARIES option controls whether these are interpreted as upper or lower boundaries of the groups; by default they are lower limits. With reduced numbers of classes, the value to represent each group is the median of the units in the group. The WEIGHTS option can supply a variate of weights for the units of the vector, to be used when calculating the table. If this is not set, the units are all assumed to have weights equal to one.
The PRINT option controls which summaries are printed. The DIRECTION option controls the order of the tally table (ascending or descending). For a factor, the FREPRESENTATION parameter controls which attribute is used to sort the groups (ordinals, levels or labels); by default the levels are used. Also the OMITEMPTY option can be set to omit empty groups. The GRAPH option may be set to cumulative to produce a cumulative frequency graph, or %cumulative to produce a percentage graph. The PQUANTILES option controls whether or not the graphs include quantiles.
The VALUES, FREQUENCIES, PERCENTAGES, CUMFREQUENCIES, CUMPERCENTAGES parameters can be used to save the information (in variates).
Options: PRINT, GRAPH, NGROUPS, DECIMALS, BOUNDARIES, DIRECTION, OMITEMPTY, WEIGHTS, PQUANTILES.
Parameters: DATA, LIMITS, FREPRESENTATION, VALUES, FREQUENCIES, PERCENTAGES, CUMFREQUENCIES, CUMPERCENTAGES.
Method
The GROUPS directive is called for a variate or text to form the grouping factor. Then TABULATE forms the counts for each group.
Action with
RESTRICT
Restricted units are left out of the tally results.