Documentation

13.12 Covariate plots: P12-P17

P12–P17 inspect continuous/categorical distributions, design balance, pairwise relationships, and correlations using baseline subject values. They help identify range, rare levels, confounding, redundancy, and transformations worth investigating.

The covariate plot family

Distribution and balance

P12 (cov_hist) draws continuous histograms. Look for impossible values, heaping, long tails, multimodality, and truncation. P13 (cov_by_group) uses box plots to compare continuous covariates across the colour or strata group. P14 (cat_cov) shows categorical level counts. Always pair shapes with numbers; a box can hide a tiny group.

Relationships

P15 (cov_pairs) makes lower-triangle scatter plots for up to eight continuous covariates, with descriptive smoothers. P16 (cov_corr) gives Pearson correlations. Pearson correlation measures linear association and is sensitive to outliers; near-zero correlation can coexist with a nonlinear relationship. P17 (cont_by_cat) compares each continuous covariate across categorical levels, potentially over multiple pages.

These are screening views, not a variable-selection procedure. Correlated covariates can reflect biology, derivation (BMI from WT/HT), or study design. Decide whether to include both based on scientific meaning and model identifiability, not a universal correlation cutoff.

A practical review sequence

Start with P12/P14 to understand each variable alone. Move to P13/P17 for design and categorical comparisons, then P15/P16 for continuous relationships. This order helps distinguish a pairwise association from a marginal outlier or an imbalanced study group. Annotate any transformation, baseline rule, or excluded level before circulating the figures.

Common mistakes

  • Treating baseline distributions as record-level distributions.
  • Interpreting a smoother as causal evidence.
  • Deleting a scientifically important covariate solely because of correlation.
  • Missing rare categorical levels hidden by percentage-only summaries.

Checklist

  • Verify units, ranges, and baseline rule.
  • Review group counts before balance claims.
  • Inspect both scatter plots and correlations.
  • Identify derived/redundant variables explicitly.
  • Carry candidate issues into a prespecified modelling plan.

Further reading

See covariate discovery, T02/T03 tables, and covariate QC.