Documentation

13A.23 Summary tables and statistics

A summary table produces one row per variable and grouping combination. --table-vars selects numeric variables, --table-by defines strata, and --table-stats defines columns. Without variables, every numeric column is considered; explicit selection is safer for reports.

nlmx custom data.csv --filter "EVID == 0" `
  --table-kind summary --table-vars DV --table-by DOSE,TIME `
  --table-stats n,geomean,geocv,median,p5,p95

The frozen concentration summary contains 24 dose-time rows. It records N before reporting geometric and robust summaries. Geometric statistics require positive values; missing or nonpositive inputs affect availability and denominators.

Choosing statistics

Mean and SD describe additive distributions; geometric mean and geometric CV suit positive multiplicative distributions; median and percentiles resist extremes. SE and confidence limits address uncertainty in the mean under assumptions, not observed spread. nmiss should accompany variables where missingness matters.

--table-total adds an overall group where supported. An overall statistic can be dominated by unequal strata and should not replace stratified values. Several by columns are combined; verify each cell's N.

Start table design from the scientific sentence the reader must support. “Typical concentration and variability by dose and time” suggests geometric mean, geometric CV, median, percentiles, and N; “measurement precision” would require different evidence. Avoid selecting every available statistic merely because it exists.

Validate at least one group with an independent calculation and confirm the number of groups equals the expected combinations. Unexpected extra rows often reveal whitespace, capitalization, or numeric/text inconsistencies in grouping variables.

Common mistakes

  • Using geometric mean with zero or negative values.
  • Reporting SE as subject variability.
  • Omitting N and missingness.
  • Comparing overall summaries from differently weighted strata.

Checklist

  • Select variables explicitly.
  • Match statistics to distribution and scientific question.
  • Include N and, where needed, nmiss.
  • Review positivity for geometric summaries.
  • Confirm every grouping combination and denominator.

Further reading

See statistics and quantiles, error bars, pivot tables, and worked report tables.