Tutorials › Population Pharmacokinetics › Covariate Distributions and Data Coverage Plots

Exploratory Data Analysis · Tutorial 67 of 599

Covariate Distributions and Data Coverage Plots

Use univariate covariate plots to describe who and what the dataset covers before investigating relationships with concentrations.

Intermediate 11 min read

What You'll Learn

  • Construct and interpret histograms with explicit bin boundaries and denominators.
  • Use boxplots to summarize a covariate while checking for hidden gaps and influential extremes.
  • Report category counts and percentages with the correct analysis population and missing-data denominator.
  • Distinguish observed data coverage from the broader population to which a model may be applied.
  • Recognize plot choices and data structures that can make covariate coverage look misleading.

Why Inspect Covariate Coverage First?

Before exploring whether concentrations differ across patient characteristics, establish what the dataset actually contains. A covariate distribution plot can show whether measurements span a broad or narrow range, whether one category dominates, and whether parts of the observed range have few or no records. These are descriptions of the analysis data, not evidence that a covariate affects drug exposure.

In population pharmacokinetics, covariates may include age, body weight, renal-function measures, or categorical characteristics such as sex or formulation group. Coverage matters because a model can only be informed by the data that were observed. A sparse tail or a rare category may provide little information about that part of the covariate space. Conversely, a broad range does not by itself guarantee that every subgroup is adequately represented.

Definition: A covariate distribution plot displays the observed values or categories of one covariate, without plotting that covariate against concentration or another covariate. Data coverage describes which values or categories are represented and how densely they are represented in the analysis data. Coverage is a property of the available data, not proof of representativeness of a wider target population.

The unit represented in the plot must be explicit. For a baseline subject-level covariate, count participants, not concentration records: a participant with ten concentration samples should not contribute ten times as much as a participant with one sample. For a time-varying covariate, decide whether the display concerns participant-level summaries, such as each participant's baseline value, or all recorded values. If all records are plotted, participants with more measurements contribute more observations, so the plot describes records rather than equally weighted participants.

Histograms for Continuous Covariates

A histogram groups values of a continuous covariate into intervals, called bins, and displays the number or proportion of observations in each interval. The bin boundaries, units, and denominator should be stated or readily readable. Bin width and placement affect the visual shape: narrow bins can make ordinary variation look irregular, while wide bins can conceal gaps or clusters. A histogram is therefore a useful summary, not a unique view of the data.

If bins are mutually exclusive and cover all observed values, their counts sum to the number of nonmissing observations. For a count histogram, the percentage in bin \(j\) is \(100 n_j/n_{\text{obs}}\), where \(n_j\) is its count and \(n_{\text{obs}}\) is the number of nonmissing covariate values. A percentage histogram uses these proportions; a density histogram rescales bar heights so that total bar area equals one. Do not confuse density height with the percentage of participants in a bin.

$$ \text{Percentage in bin } j = 100\frac{n_j}{n_{\text{obs}}}, \qquad \sum_{j=1}^{k} n_j=n_{\text{obs}}. $$

Worked Example: Checking Weight Coverage With a Histogram

Suppose a hypothetical analysis dataset contains baseline weights, in kilograms, for 12 participants: 22, 24, 26, 27, 29, 31, 34, 39, 42, 45, 51, and 67. Use the bins 18 to less than 28, 28 to less than 38, 38 to less than 48, 48 to less than 58, and 58 to 68 inclusive. Count each participant once.

The first bin contains 22, 24, 26, and 27: \(n_1=4\). The second contains 29, 31, and 34: \(n_2=3\). The third contains 39, 42, and 45: \(n_3=3\). The fourth contains 51: \(n_4=1\). The final bin contains 67: \(n_5=1\). The counts sum to \(4+3+3+1+1=12\), as required.

The percentages are \(100(4/12)=33.3\%\), \(100(3/12)=25.0\%\), \(100(3/12)=25.0\%\), \(100(1/12)=8.33\%\), and \(100(1/12)=8.33\%\). They sum to approximately 100% (rounding explains any tiny discrepancy). The observed weights range from 22 to 67 kg. The two upper bins together contain only two participants, so the upper part of this observed range is sparse. This does not establish that heavier patients are uncommon in the target population; it says only that few are present in this hypothetical dataset.

The bin convention prevents boundary values from being counted twice. In this example, 28 belongs in the second bin, not the first; the final bin includes its upper endpoint so that the maximum value is covered. Always check that the smallest and largest observations are included and that the plotted counts reconcile to the stated denominator.

Boxplots: Compact Summaries and Their Limits

A boxplot summarizes a continuous distribution using its median, lower and upper quartiles, and possible extremes. The box typically extends from the first quartile \(Q_1\) to the third quartile \(Q_3\); its length is the interquartile range, \(IQR=Q_3-Q_1\). A line inside the box marks the median. In a common Tukey boxplot, whiskers extend to the most extreme observations no farther than 1.5 IQR beyond the box, and more distant values are plotted individually. Software and quartile conventions can differ, so report the convention when exact quartiles matter.

$$ IQR=Q_3-Q_1,\qquad \text{lower fence}=Q_1-1.5(IQR),\qquad \text{upper fence}=Q_3+1.5(IQR). $$

The fences are a rule for flagging observations for visual inspection, not clinical limits and not a test for data errors. A boxplot also compresses information: it may hide gaps, multiple clusters, or an unevenly populated tail. Pair it with a histogram or a display of individual values when the shape or local coverage matters.

Worked Example: Interpreting an Age Boxplot

Consider hypothetical ages in years for 12 participants: 19, 21, 22, 23, 25, 27, 31, 34, 39, 44, 58, and 72. Use the convention that \(Q_1\) and \(Q_3\) are the medians of the lower and upper halves of the ordered data.

The median is the mean of the sixth and seventh values: \((27+31)/2=29\) years. The lower half is 19, 21, 22, 23, 25, 27, so \(Q_1=(22+23)/2=22.5\) years. The upper half is 31, 34, 39, 44, 58, 72, so \(Q_3=(39+44)/2=41.5\) years. Thus \(IQR=41.5-22.5=19.0\) years.

The upper fence is \(41.5+1.5(19.0)=70.0\) years, and the lower fence is \(22.5-1.5(19.0)=-6.0\) years. The value 72 is beyond the upper fence and would be flagged in a Tukey boxplot. It is not thereby an error: verify it against source data and clinical context. The observed range is 19 to 72 years, but only one participant is above 58 years. A boxplot communicates the median and central spread compactly; the listed values reveal the sparse upper tail more clearly.

Category Counts and Missing Values

For a categorical covariate, display a count for every category and, where useful, its percentage. The denominator needs to be unambiguous. Percentages among participants with a nonmissing value describe the distribution among observed values. Percentages among everyone in the analysis set also reflect missingness, but the observed categories will then sum to less than 100%. Neither denominator is universally preferable; the display should identify which one it uses and report missingness separately.

Worked Example: Reporting a Categorical Covariate

In a hypothetical analysis set of 54 participants, a prespecified renal-function category is available for 48: 30 are in category A, 14 in category B, and 4 in category C. Six participants have no recorded category.

Among participants with observed values, the percentages are \(100(30/48)=62.5\%\), \(100(14/48)=29.2\%\), and \(100(4/48)=8.33\%\). These percentages sum to approximately 100%. Missingness is \(6/54=11.1\%\) of the full analysis set. If percentages are instead calculated using all 54 participants, the observed category percentages are 55.6%, 25.9%, and 7.41%, and they sum to 88.9%; the remaining 11.1% is missing.

A clear report would give both the counts and the denominator, for example: “Among 48 participants with observed category, 30 (62.5%) were in A, 14 (29.2%) in B, and 4 (8.33%) in C; category was missing for 6 of 54 participants (11.1%).” Category C is represented by only four participants, so estimates for that group may be imprecise in later analyses. The count itself does not show whether category membership is associated with concentration.

Choosing and Checking a Coverage Display

Histograms, boxplots, and category-count displays answer related but distinct questions. Histograms show how continuous observations are distributed across chosen intervals. Boxplots provide a compact view of median, central spread, and flagged extremes. Category counts make representation and imbalance across discrete groups explicit. A concise comparison helps prevent one display from being asked to show information it does not retain.

DisplayUseful forWhat it can obscure
HistogramRange, clusters, gaps, and relative frequency across a continuous covariateShape can change with bin width and boundary placement
BoxplotMedian, quartiles, spread, and observations beyond Tukey fencesMultimodality, internal gaps, and exact tail frequencies
Category-count plot or tableCounts and imbalance across categories, including rare groupsWithin-category variation for a continuous covariate

As a practical check, inspect the number of observations, missingness, units, range, and plot denominator before interpreting a shape. For repeated records, confirm whether the plot counts unique participants or records. For a continuous covariate, try a second reasonable bin width if the apparent gaps or clusters depend strongly on the first choice. For a categorical covariate, preserve meaningful categories and show small counts rather than hiding a sparse group inside a broad “other” category without explanation.

A visible gap can arise because of the study's eligibility criteria, measurement practices, recruitment, or chance. A value outside an expected range deserves a source-data and plausibility check, but a statistical outlier rule alone cannot determine whether it is erroneous. Likewise, a category imbalance may be expected by design. The plot helps identify what needs explanation; it does not identify the cause.

Interpretation and Common Pitfalls

Coverage summaries describe the analysis dataset, not the full population that might receive treatment. A covariate range from 22 to 67 kg does not establish support for predictions below 22 kg or above 67 kg. Even inside that range, very sparse observations can limit what the data can tell us. These plots should be reviewed before covariate-concentration displays, but they do not assess a covariate's relationship with concentrations or establish a covariate effect.

  • Wrong reasoning: “The boxplot flags a participant, so that record is an error and should be removed.” Correction: A Tukey flag is a prompt to check the record and context. It is not a data-cleaning decision by itself.
  • Wrong reasoning: “There are few observations in a bin, so the covariate is rare in the population.” Correction: The plot shows sparse representation in this dataset; the population frequency depends on sampling and study design.
  • Wrong reasoning: “The category percentages do not sum to 100%, so the counts are wrong.” Correction: First check whether percentages use all participants or only those with observed values. Report missingness and the denominator explicitly.
  • Wrong reasoning: “The histogram has no bar in an interval, so the entire population has no values there.” Correction: An empty bin records no observed participants in that interval. It does not establish a structural absence in the population.
Key takeaway: A sound coverage display states what is counted, the units and denominator, the observed range or category counts, and where data are sparse or missing. It describes the evidence available for later analysis without claiming more than the data support.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions below.

  1. For a histogram with 40 nonmissing participants, one bin contains 6 participants. What percentage is in that bin?
  2. A dataset has 80 participants; a categorical covariate is observed for 72, of whom 54 are in category A. Give the percentage in A among observed values and the missing percentage in the full dataset.
  3. A Tukey boxplot flags an age of 76 years. What does the flag mean, and what should be done next?
  4. Why can a histogram with an empty bin not establish that the target population has no covariate values in that interval?
  5. A participant contributes eight records and another contributes two. What issue arises if all ten records are used to describe a baseline participant-level covariate?

Solutions. (1) \(100(6/40)=15.0\%\). (2) Among observed values, \(100(54/72)=75.0\%\) are in A; missingness is \(100(8/80)=10.0\%\). (3) The age is beyond a boxplot fence, which flags it for review but does not prove an error; check source records and context before deciding how to handle it. (4) The interval contains no observations in this dataset, but sampling and study design mean that the target population may still include such values. (5) The participant with eight records receives four times the weight of the participant with two, so the plot describes records rather than an equally weighted distribution of participants. Count each participant once for a baseline participant-level summary.

Clinical Biostats