The chart statistics
are the statistical values calculated for the chart variable or the
response variable. When there is no response variable, the GBARLINE
procedure calculates one of four possible statistics with the default
being FREQ. When there is a response variable one of two possible
statistics is computed with the default being SUM. You can specify
the chart statistic with the TYPE= option for both the bar chart and
any line plot. For the bar chart, the default statistic is frequency.
For the plot variable, the default statistic is sum.

The cumulative frequency
statistic adds the frequency for the current midpoint to the frequency
of all of the preceding midpoints. For example, the frequency for
the

`Denver`

midpoint is 7, and the
frequency for the next midpoint, `Seattle`

,
is 9. Therefore, the cumulative frequency for `Seattle`

is 16 and the cumulative frequency for `Tokyo`

is
21.
The percentage statistic is calculated
by dividing the frequency for each midpoint by the total frequency
count for all midpoints in the chart or group and multiplying it by
100. For example, the frequency count for the

`Denver`

midpoint
is 7 and the total frequency count for the chart is 21, so the percentage
statistic for `Denver`

is 33.3%.
The cumulative percentage
statistic adds the percentage for the current midpoint to the percentage
for all of the preceding midpoints in the chart or group. For example,
the percentage for the

`Denver`

midpoint
is 33.3, and the percentage for the next midpoint, `Seattle`

,
is 42.9, so the cumulative percentage for `Seattle`

is 76.2.
The sum statistic is the total of the values, for each
midpoint, for the variable specified by the SUMVAR= option. For example,
if you specify SUMVAR=SALES and the values of the SALES variable for
the seven

`Denver`

observations are `8734`

, `982`

, `1504`

, `3207`

, `4502`

, `624`

,
and `918`

, the sum statistic for the `Denver`

midpoint
is 20,471.
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:

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.

See also the descriptions
of the options TYPE=statistic, SUMVAR=numeric-variable, and FREQ=numeric-variable.