ERRORBAR Subcommand (IGRAPH command)
Error bars help you to visualize distributions and dispersion by indicating the variability of the measure being displayed. The mean of a scale variable is plotted for a set of categories, and the length of an error bar on either side of the mean value indicates a confidence interval or a specified number of standard errors or standard deviations. Error bars can extend in one direction or in both directions from the mean. Error bars are sometimes displayed in the same chart with other chart elements, such as bars.
One of the following three keywords indicating the statistic and percentage/multiplier applied to the error bars must be specified:
CI(Pct). Error bars
represent confidence intervals. Pct
indicates the level of confidence and varies from
0 to 100.
SD(sdval). Error bars
represent standard deviations. Sdval
indicates how many standard deviations above and
below the mean the error bars extend. Sdval
must between 0 and 6.
SE(seval). Error bars
represent standard errors. Seval
indicates how many standard errors above and below the mean the
error bars extend. Seval
must
between 0 and 6.
In addition, the following keywords can be specified:
LABEL. Labels error
bars with means ( VAL
) and the number of cases ( N
).
DIRECTION. This keyword is no longer supported and is ignored. Error bars always extend both above and below the mean values.
CAPSTYLE. For error
bars, the style can be T-shaped
( T
) or no cap ( NONE
). The default style is T-shaped. FANCY
is no longer supported and is ignored.
SYMBOL. Displays the
mean marker ( ON
). For no symbol, specify OFF
.
BASELINE val. Defines the
value ( val
) above which the error bars extend above the bars and
below which the error bars extend below the bars.
CAPWIDTH(pct). Controls the
width of the cap relative to the distance between categories. Pct
equals the percent of the
distance. The default value for pct
is 45.
Example
IGRAPH
/X1=VAR(volume94) TYPE=CATEGORICAL
/Y=VAR(sales96) TYPE=SCALE
/BAR (MEAN) LABEL INSIDE VAL SHAPE=RECTANGLE BASELINE=0.00
/ERRORBAR SE(2.0) CAPWIDTH (45) CAPSTYLE=NONE.
-
BAR
creates a bar chart with rectangular bars. The bars represent the mean sales96 values for the volume94 categories. -
ERRORBAR
adds error bars to the bar chart. The error bars extend two standard errors above and below the mean.