By default, each observation
is counted only once in the calculation of the chart statistic. To
calculate weighted statistics in which an observation can be counted
more than once, use the FREQ= option. This option identifies a variable
whose values are used as a multiplier for the observation in the calculation
of the statistic. If the value of the FREQ= variable is missing,
0, or negative, the observation is excluded from the calculation.
If you use the SUMVAR=
option, then the SUMVAR= variable value for an observation is multiplied
by the FREQ= variable value for that observation when calculating
the chart statistic.
For example, to use
a variable called COUNT to produce weighted statistics, assign FREQ=COUNT.
If you also assign the variable HEIGHT to the SUMVAR= option, then
the following table shows how the values of COUNT and HEIGHT would
affect the statistic calculation:
|
|
Number of Times the
Observation is Used
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
By default, the percentage
and cumulative percentage statistics are calculated based on the frequency.
If you want to chart a percentage or cumulative percentage based
on a sum, you can use the FREQ= option to specify a variable to use
for the “sum” calculation. You can also specify the
PCT statistic, as shown in this example:
freq=count type=pct
Because the variable
that is used by the FREQ= option determines the number of times an
observation is counted, the value of COUNT is the equivalent of the
sum statistic.
See also the descriptions
of the TYPE=, SUMVAR=, and FREQ= options for the action statements.