Tutorials › Nonlinear Mixed-Effects Models (NLME) › Choosing the Unit of Analysis in Repeated-Measures PK Data

Why Mixed-Effects Models · Tutorial 18 of 797

Choosing the Unit of Analysis in Repeated-Measures PK Data

Learn to distinguish the unit that defines the scientific question from the records used to calculate an answer, and to justify the choice for common repeated-measures PK questions.

Beginner 11 min read

What You'll Learn

  • Match the analysis unit to the target question and estimand.
  • Distinguish subjects, individual measurements, and subject-time records.
  • Identify when summaries should give equal weight to each subject.
  • Choose a suitable unit for describing individual trajectories and comparing treatments.
  • Recognize when unequal sampling or dependence makes a row-by-row analysis misleading.
  • Check whether the study design and observed data support the chosen analysis unit.

Start With the Question, Not the Data Table

A repeated-measures pharmacokinetic (PK) data set often has many rows per participant: each row may contain a subject identifier, a sampling time, a concentration, and treatment information. The number of rows is not automatically the number of independent units, nor does it determine which unit is relevant to the scientific question. The right choice depends on what quantity is being described or compared.

For a population summary, the target might be the average concentration across subjects at a specified time. For an individual trajectory, the target is a subject’s pattern of concentration over time. For a treatment comparison, the target might be a difference between treatment groups in a concentration summary. These questions use the same underlying data but do not necessarily use the same analysis unit.

Definition: The subject is the individual from whom one or more PK measurements are collected. An observation is a recorded measurement, such as a concentration value. A subject-time record links a particular subject to a particular sampling time and its recorded value. The analysis unit is the unit to which the quantity being estimated or compared refers. It must be chosen to match the scientific question and study design.

A subject-time record is a convenient data-table row, but it is not automatically an independent unit. Measurements from the same subject are related because they come from that subject’s repeated profile. The earlier material on pseudoreplication and within-subject correlation explains why counting every row as an independent subject can misrepresent the amount of independent information.

Three Questions, Three Roles for the Data

Use the following distinctions when deciding what the analysis unit should be:

  • Population summary: The target often gives equal standing to each subject. For example, the mean of the subjects’ concentrations at a specified time describes an average subject-level concentration at that time.
  • Individual trajectory: The subject is the unit being described. Several subject-time records are needed to show that person’s course over time; no single record represents the whole trajectory.
  • Treatment comparison: The unit depends on how treatment was assigned and on the endpoint. In a parallel-group study, treatment is assigned to subjects, so subjects provide the independent treatment comparisons. Repeated measurements may contribute to each subject’s endpoint but do not create additional treated subjects.

The unit used to compute a summary can differ from the unit represented by the raw records. For example, a mean concentration at a time point is calculated from concentration records, but if the target is the average across subjects, each subject should contribute according to the stated subject-level target—not simply according to how many rows happen to be present.

Worked Example: A Population Mean With Unequal Numbers of Records

Consider hypothetical measurements in a common sampling window around a specified time. Subject A contributes one concentration record, subject B contributes two, and subject C contributes three. The values, in mg/L, are A: 8; B: 12 and 14; C: 20, 22, and 24. Suppose the question is: what is the average of the three subjects’ within-window mean concentrations?

First calculate one mean for each subject: A has \(8\) mg/L, B has \((12+14)/2=13\) mg/L, and C has \((20+22+24)/3=22\) mg/L. The target gives one contribution to each subject, so the subject-weighted average is

$$ \frac{8+13+22}{3} = \frac{43}{3} \approx 14.33\ \text{mg/L}. $$

If instead every record is given equal weight, the calculation is \((8+12+14+20+22+24)/6=100/6\approx16.67\) mg/L. That answers a different question: the average among the six recorded values, weighting subjects in proportion to their number of records. The two results differ because the records are not equally distributed across subjects.

The subject-weighted answer is appropriate for the stated question, provided the within-window measurements are comparable and the subject-level means are meaningful summaries of that window. It is not automatically the right answer for every population summary. If the target is specifically the average recorded value, or if the sampling plan defines another weighting scheme, the estimand and weighting must be stated accordingly.

Why the Weighting Follows From the Target

Let \(C_{ij}\) denote the concentration for subject \(i\) at record \(j\), and let \(m_i\) be the number of records contributed by subject \(i\). Define that subject’s mean as \(\bar{C}_i=(1/m_i)\sum_{j=1}^{m_i}C_{ij}\). When the target is the average of the \(N\) subject-specific means, its sample estimate is

$$ \frac{1}{N}\sum_{i=1}^{N}\bar{C}_i = \frac{1}{N}\sum_{i=1}^{N} \left(\frac{1}{m_i}\sum_{j=1}^{m_i}C_{ij}\right). $$

Each subject’s records are first combined into one subject-level value, and that value receives weight \(1/N\). By contrast, the record-weighted average is

$$ \frac{\sum_{i=1}^{N}\sum_{j=1}^{m_i}C_{ij}} {\sum_{i=1}^{N}m_i} = \sum_{i=1}^{N} \left(\frac{m_i}{\sum_{k=1}^{N}m_k}\right)\bar{C}_i. $$

This expression shows why subjects with more records receive more weight in the record average: subject \(i\)'s weight is \(m_i/\sum_k m_k\), not \(1/N\). If all subjects contribute the same number of records, the two averages agree; with unequal counts, they generally do not. The arithmetic does not decide which is scientifically relevant. The target does.

Worked Example: Choosing the Unit for Individual Trajectories

Suppose two hypothetical subjects have concentrations recorded at 1, 3, and 5 hours. Subject A has 18, 10, and 6 mg/L; subject B has 8, 7, and 6 mg/L. The question is how each subject’s observed concentration changes over the 1-to-5-hour interval.

The relevant unit is the subject, because the question asks about individual patterns. The records are needed to describe each trajectory. Using the first and last observations, subject A’s average change per hour over this interval is

$$ \frac{6-18}{5-1} = \frac{-12}{4} = -3\ \text{mg/L per hour}. $$

For subject B it is

$$ \frac{6-8}{5-1} = \frac{-2}{4} = -0.5\ \text{mg/L per hour}. $$

These calculations describe the average observed change between the two endpoint times; they do not claim that the concentration changed linearly between samples. Pooling the measurements into one undifferentiated set would lose the information about which records belong to which subject, and therefore would not answer the individual-trajectory question.

Treatment Comparisons Must Respect the Design

In a parallel-group study, treatment is assigned to subjects. If the endpoint is a concentration summary calculated from several scheduled times, first define how those times contribute to each subject’s endpoint. Then compare the subject-level endpoints between treatment groups. The repeated records supply information for each endpoint; they do not multiply the number of subjects assigned to treatment.

Worked Example: Comparing Treatments Using Subject-Level Endpoints

In a hypothetical parallel-group study, each subject has concentrations recorded at 2 and 6 hours. Define the endpoint in advance as the equally weighted average of those two concentrations. Three subjects receive treatment A, with values (10, 6), (14, 8), and (12, 10) mg/L. Three subjects receive treatment B, with values (8, 4), (10, 6), and (12, 8) mg/L.

The subject-level endpoints for treatment A are \((10+6)/2=8\), \((14+8)/2=11\), and \((12+10)/2=11\) mg/L. Their group mean is

$$ \bar{Y}_A=\frac{8+11+11}{3}=10\ \text{mg/L}. $$

For treatment B, the endpoints are 6, 8, and 10 mg/L, giving

$$ \bar{Y}_B=\frac{6+8+10}{3}=8\ \text{mg/L}. $$

The estimated difference, treatment A minus treatment B, is \(10-8=2\) mg/L for this defined endpoint. There are three subjects per treatment group, not six independent subjects per group. The observed difference is descriptive; by itself, it does not establish a treatment effect in a broader population. Inference would also require an appropriate analysis and assumptions about the design, subject independence, and the endpoint.

The endpoint gives equal weight to 2 and 6 hours by definition. If the scientific question instead concerns a treatment contrast at each time separately, the time-specific contrasts should be defined and reported. Averaging over times without specifying the target can obscure time-related differences.

For a crossover design, each subject may receive more than one treatment. The subject remains the unit that links the repeated treatment periods, but the treatment comparison is based on within-subject treatment contrasts, with period and design features taken into account. It would be incorrect to treat each concentration record or each treatment period as an unrelated subject. The appropriate endpoint and comparison depend on the protocol and the question.

Checks, Alternatives, and Common Failure Modes

Before calculating, state the target in words: for example, “the average of subjects’ concentrations at 4 hours,” “each subject’s change over the observed interval,” or “the difference between treatment groups in each subject’s mean concentration at two specified times.” Then check whether the data and design support that target.

  • Check identifiers and timing. Confirm which records belong to each subject, whether times are comparable across subjects, and whether duplicate or mistimed records are being handled consistently.
  • Check contributions by subject. Tabulate the number of records per subject and inspect whether some subjects dominate a record-weighted summary.
  • Check the target against missingness. If some subjects lack measurements at a time or visit, the available subjects may differ from the intended population. Averaging only observed records does not automatically recover the target for all subjects.
  • Check treatment assignment. In a parallel design, treatment comparisons are between subjects; in a crossover, treatment is compared within subjects according to the design. The data layout alone does not identify the design.

A subject-level summary is often transparent when each subject has a clearly defined endpoint and the question concerns subjects. It can, however, discard time-specific detail or become awkward when the observation schedule is sparse or irregular. A record-level analysis can retain the time information, but it must account for the dependence of repeated records from the same subject and must match the intended target. A raw pooled average is simpler, but it answers a record-weighted question unless its weighting happens to match the subject-level target.

A common mistake is to say, “There are 60 concentration records, so the treatment comparison has 60 independent observations.” That reasoning confuses the number of recorded values with the number of independently assigned subjects. In a parallel-group design with 30 subjects and two records per subject, there are 30 treatment-assignment units, not 60. The correction is to define the endpoint or target first, preserve subject identity, and use an analysis that respects repeated measurements and the treatment design.

Key takeaway: The subject, observation, and subject-time record are not interchangeable analysis units. Choose the unit by naming the target quantity, identifying how subjects and records contribute to it, and respecting the dependence and assignment structure of the study.

Check Your Understanding

For each question, identify the relevant unit and explain the choice. Solutions follow the questions.

  1. A study asks for the average concentration at a scheduled time across patients, and each patient is intended to contribute equally. What unit should define the target?
  2. A report describes how one patient’s measured concentrations change over time. What is the unit being described, and what role do the multiple records play?
  3. A parallel-group study has 24 subjects, each with four concentration records. How many independent treatment-assignment units are there, and why?
  4. Five subjects contribute one record each and one subject contributes five records. If the target is the average of the six subjects’ own means, should the sixth subject receive five times the weight?

Solutions. (1) The subject defines the target because each patient is meant to contribute equally; records provide the concentration values used to form the summary. (2) The subject is the unit being described. Its multiple subject-time records make up the observed trajectory. (3) There are 24 independent treatment-assignment units, because treatment was assigned to subjects; four records per subject do not create additional assigned subjects. (4) No. First calculate each of the six subject-specific means, then average those six means with weight \(1/6\) each. Giving the sixth subject five times the weight would instead move toward a record-weighted target.