Documentation

13A.16 Errorbar, pointrange, and summary functions

errorbar draws uncertainty or spread around a summarized y at each x. pointrange draws the center and interval together. Both use --summary-fun for the center and --summary-error for the interval. When a line or point layer is present with an errorbar, custom uses the summary context required by the group/category geom.

Available centers are mean, median, sum, min, max, n, sd, geomean, q1, and q3. Interval choices are SD, SE, 95% CI, IQR, range, or none. These quantities answer different questions: SD describes observed spread; SE and CI describe uncertainty in a mean under assumptions; IQR describes the middle half; range is determined by extremes.

Mean concentration with SD

The example maps dose to colour and group, uses categorical time, and summarizes observation rows. The line connects dose-specific means; it does not show individual trajectories. Its SD bars must not be called confidence intervals.

Repeated observations from the same subjects violate the simple independent-record intuition behind a conventional CI. Use the plot descriptively, or calculate model-based uncertainty in the appropriate analysis command. Sparse cells can yield unstable or unavailable intervals; show N in a companion table.

Before publication, manually verify one cell from the CSV: calculate its center and interval using the documented formula. This small known-answer check detects grouping mistakes, incorrect categorical conversion, and confusion between SD and SE. When intervals overlap, do not translate that visual fact into a significance conclusion.

Common mistakes

  • Calling SD bars 95% confidence intervals.
  • Connecting centers across incomparable groups.
  • Ignoring repeated-subject dependence.
  • Hiding small cell sizes behind polished intervals.

Checklist

  • Name center and interval in caption or title.
  • Confirm grouping and categorical x levels.
  • Provide cell N.
  • Distinguish descriptive spread from inferential uncertainty.
  • Use model-derived intervals when the scientific claim requires them.

Further reading

See bar summaries, summary tables, statistics, and Chapter 13's centres and errors.