Tutorials › Pharmacometric Workflows and Reproducible Modeling › Weight and Body-Size Variables

Data Specification and Dataset Preparation · Tutorial 29 of 399

Weight and Body-Size Variables

Prepare body-size variables so their units, timing, provenance, and status remain clear when they are used in pharmacometric data.

Intermediate 11 min read

What You'll Learn

  • Specify body-size values with explicit units, measurement times, and source information.
  • Convert units reproducibly while preserving the originally recorded value.
  • Flag abrupt weight changes for investigation without treating them automatically as errors.
  • Distinguish measurements from unit conversions, derived variables, and substituted or imputed values.
  • Represent missing or carried-forward weight transparently when preparing time-varying covariates.

Why Body-Size Records Need More Than a Number

A weight value can affect interpretation of an exposure model, but a number alone is not a usable covariate. “70” could mean kilograms or pounds; it could be a measurement from screening or from the day of a concentration sample; and it could be measured, converted, carried forward, or imputed. Those differences matter. A value with the wrong unit can be seriously wrong in magnitude, while a correctly measured value from the wrong time can misrepresent a participant’s body size at the event being analyzed.

The practical task is to prepare each body-size record so that its meaning and origin are recoverable. Preserve the source value and unit, record when the measurement was taken, and distinguish that observation from any value created during data preparation. This is particularly important for weight, which can vary over time, and for other measures such as height, waist circumference, or body-surface measurements.

Definition: A measured body-size value is a value recorded from an actual measurement, accompanied by the measurement’s subject, variable, unit, and time. A converted value is the same measurement expressed in another unit. A derived value is calculated from one or more inputs using a specified rule. An imputed value is supplied for an unobserved or missing value under a stated imputation rule. These categories are not interchangeable: retain enough information to identify which one a dataset value represents.

Represent the Measurement and Its Time

At minimum, a prepared record should identify the subject, body-size variable, numeric value, unit, measurement time, and source. If the source supplies a status or method, preserve that too. Keep the source record or a traceable link to it, particularly when the analysis-ready dataset uses a converted or otherwise changed value. A useful structure separates the original value and unit from the standardized value and unit rather than overwriting the source.

The relevant time is the time the measurement was taken, not automatically the time it was entered into a database, the nominal visit label, or the time of the nearest dose. Retain the most precise valid measurement time available. If only a date is known, do not manufacture an exact time; record the date-level precision or an explicit time-precision indicator. Apply the project’s established time-zone and time-origin conventions consistently.

When a weight is used as a time-varying covariate for a dose or sample event, the analysis rule must say which measurement is assigned to that event. For example, it may use a measurement taken at the event, or the latest eligible measurement before it. The rule should specify how old a measurement may be and what happens when no eligible measurement exists. A future measurement should not silently be treated as if it were already known at an earlier event.

FieldExamplePurpose
Subject and variableSubject P014; body weightIdentifies what was measured and for whom
Source value and unit154 lbPreserves the recorded observation
Standardized value and unit69.85 kgSupports consistent downstream use
Measurement time2026-04-12, date onlyShows when the measurement applies and its precision
Value status and provenanceMeasured; converted from sourceDistinguishes observation from transformation

Worked Example: Converting a Recorded Weight

A hypothetical source record reports a participant’s weight as 154 lb, measured on 12 April 2026. The analysis dataset uses kilograms. Use \(1\text{ lb}=0.45359237\text{ kg}\), retain the source record, and calculate the standardized value.

Conversion formula. Multiply the source value by the number of kilograms per pound:

$$ 154\text{ lb}\times 0.45359237\frac{\text{kg}}{\text{lb}} =69.85322498\text{ kg} $$

The standardized value is 69.85 kg when reported to four significant figures. The prepared record should still retain 154 lb as the source value and identify the standardized value as a unit conversion. Its measurement time remains 12 April 2026; conversion does not change when the weight was measured. A conversion should not be labelled a new measurement or an imputation.

Check Changes Without Treating Flags as Verdicts

Repeated body-size measurements provide an opportunity to identify transcription, unit, subject-linkage, and timing problems. A useful first screen compares consecutive records for the same subject and variable. The absolute change is the new value minus the preceding value. A relative change expresses that difference in relation to the preceding value. If the interval is known, the change per unit time can also be calculated.

$$ \Delta W=W_2-W_1,\qquad \text{relative change}=\frac{W_2-W_1}{W_1}\times 100\%,\qquad \text{rate}=\frac{W_2-W_1}{t_2-t_1} $$

These summaries are interpretable only when the records refer to the same subject and measurement, use comparable units, and have correctly ordered times. A percent change also requires a nonzero reference value. The rate requires a meaningful elapsed time; a date-only timestamp does not justify pretending that the measurements were exactly 24 hours apart. Always check unit consistency before comparing values: a switch from pounds to kilograms can resemble a dramatic biological change.

A change flag is a prompt to investigate, not proof that a record is invalid. The appropriate alert rule depends on the measurement, population, time interval, and data-collection context. There is no single percentage threshold that establishes an impossible weight change for every participant. Acute fluid shifts or clinical changes may be genuine; a mistaken unit, decimal place, date, or subject identifier may create a similar pattern. The review should consult source records and context, document its outcome, and avoid silently deleting or replacing the observation.

Worked Example: Investigating an Abrupt Change

In a hypothetical dataset, participant P022 has a recorded weight of 80.0 kg on 3 June and 92.0 kg on 4 June. Both records are labelled as measured in kilograms. Calculate the change and explain what a quality-control flag can establish.

The elapsed time between the date-level records is approximately one day. The absolute change is \(92.0-80.0=12.0\) kg. Relative to the first value:

$$ \frac{92.0-80.0}{80.0}\times 100\% =\frac{12.0}{80.0}\times 100\% =15.0\% $$

The approximate rate is \(12.0\text{ kg}/1\text{ day}=12.0\text{ kg/day}\). Suppose the project uses a 10% change in one day as a review flag. This record exceeds that operational threshold and should be checked. The flag does not show that the weight is wrong: reviewers should verify the source values, units, dates, subject identity, and any available clinical context. If the source confirms both values, preserve them and document the review rather than changing one solely to remove the flag.

Keep Observed, Derived, and Imputed Values Distinct

A weight measured at a particular time is evidence from the source. A standardized-unit value is a transformed representation of that evidence. A derived body-size variable is calculated from inputs under a defined formula, and an imputed value substitutes for an unobserved value under an explicit rule or statistical procedure. These distinctions should survive the data-preparation steps, not just appear in a note written after analysis.

For a derived variable, retain its inputs, formula or algorithm version, and the time basis of those inputs. For an imputed value, record which value was missing, the imputation method, and any applicable imputation identifier or uncertainty representation. Never encode missing weight as zero: zero would be a numeric value with a different meaning, not a marker for absence. If the analysis uses a substitute for missing weight, retain the observed data separately and label the substitute so it cannot be mistaken for a measurement.

Carrying a previous weight forward is one possible assignment rule, but it does not create a new measurement. It also assumes that the earlier value is suitable for the later event under the analysis plan. Record the source measurement time and the age of that measurement at the event, and identify the carried-forward value as substituted. Other choices, such as leaving the covariate missing or using a defined imputation method, answer different analytic needs and require their own documentation.

Worked Example: Assigning a Weight When the Event-Time Value Is Missing

A hypothetical participant has measured weights of 70.0 kg on study day 0 and 72.0 kg on day 30. No weight was measured on day 45, when a pharmacokinetic sample was collected. A project rule permits the most recent earlier measurement to be carried forward for no more than 20 days. Determine whether an assigned value is permitted and how to represent it.

The latest earlier measurement is 72.0 kg from day 30. Its age on the sample day is \(45-30=15\) days. Since \(15\leq20\), the stated rule permits assigning 72.0 kg to the day-45 event. This assignment is not a day-45 measurement: the source measurement time remains day 30, and the record should identify the event-time value as carried forward from that observation.

For example, the analysis record can retain an assigned value of 72.0 kg, a source status of “carried forward,” the source measurement time of day 30, and an age of 15 days at the event. If the event were on day 55, the earlier measurement would be 25 days old, so the same rule would not permit the assignment. The dataset should then preserve the absence of an eligible measured value rather than silently extending the carry-forward period.

Practical Alternatives and Failure Modes

There is no universally best way to represent body size for every analysis. A measurement at each event is direct but may not exist. Using the latest prior measurement is practical when the analysis plan allows it, but its relevance can diminish as it ages. A visit-level or baseline value is simpler, but it does not represent subsequent changes. Interpolation between two measurements uses information from both; if the later measurement occurs after an event, that approach uses future information and may be inappropriate for an analysis intended to represent what was known at the event. A formal imputation approach can address missing values under stated assumptions, but its outputs remain imputed, not observed.

The choice should be defined before assigning values and applied consistently. Useful diagnostics include checking for mixed units, duplicate or out-of-order measurement times, unexplained abrupt changes, missing source status, and event-time assignments that use a later measurement. These checks help locate possible problems; they do not determine by themselves whether a value is clinically plausible or analytically appropriate.

  • Wrong reasoning: “The value is extreme, so it must be a data error.” Correction: Treat an extreme change as a review signal; verify the source and context before deciding how to handle it.
  • Wrong reasoning: “The standardized column says kilograms, so the source was measured in kilograms.” Correction: Preserve the original unit and conversion provenance; a converted value is not evidence of the source unit.
  • Wrong reasoning: “The last available weight is the participant’s measured weight at every later event.” Correction: It remains a measurement from its original time; any later assignment must follow an explicit rule and be labelled accordingly.
  • Wrong reasoning: “A blank weight can be replaced by zero so the dataset is complete.” Correction: Zero is a value, not a missingness marker. Preserve missingness or use a documented method that distinguishes substituted values from observations.
Key takeaway: A defensible body-size covariate has a traceable value, unit, measurement time, and status. Convert units reproducibly, investigate abrupt changes rather than automatically rejecting them, and never present a derived, carried-forward, or imputed value as a direct measurement.

Check Your Understanding

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

  1. A source records 176 lb. Convert it to kilograms using \(1\text{ lb}=0.45359237\text{ kg}\), and state what source information should remain available.
  2. A participant’s weight changes from 64.0 kg to 68.8 kg in two days. Calculate the percent change relative to the first measurement. Does the calculation alone establish an error?
  3. A sample occurs on day 18. The latest measured weight is 75.0 kg from day 8, and the project permits carry-forward for at most 14 days. What value may be assigned, and how should it be labelled?
  4. Why should a date-only measurement not be assigned an invented clock time?
  5. Give one reason an abrupt change might be genuine and one reason it might reflect a data problem.

Solutions. (1) \(176\times0.45359237=79.832256\) kg, or 79.83 kg to four significant figures. Retain 176 lb, the source unit, the measurement time, and the conversion provenance. (2) The difference is \(68.8-64.0=4.8\) kg; the relative change is \((4.8/64.0)\times100\%=7.50\%\). This calculation flags the size of the change but cannot establish an error; check the source, units, timing, and context. (3) The prior value is \(18-8=10\) days old, within the 14-day limit, so 75.0 kg may be assigned as a carried-forward value, with its day-8 measurement time and day-18 assignment status retained. (4) An invented time falsely implies precision and can affect the ordering of events; preserve date-level precision. (5) A genuine clinical or fluid change is possible; a unit switch or transcription error is a possible data problem. In either case, investigate before changing the record.

Clinical Biostats