By default, each observation is counted only once in
the calculation of a 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, zero, or negative,
then 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 the observation. The product of this
calculation determines 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:
Example of Weighted Statistics
|
|
Number of times the
observation is used
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
By default, the percentage
and cumulative percentage statistics are calculated based on the frequency.
Suppose you want to graph 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 and then specify PCT as the statistic, as
shown in this example:
freq=count type=pct;
Because the variable
that is specified by the FREQ= option determines the number of times
an observation is counted, the value of COUNT is the equivalent of
the sum statistic.
Note: The FREQ= option is not supported
by ActiveX or Java.