Documentation

22.20 Time-varying covariates

Time-varying covariates can represent renal function, biomarkers, concomitant treatment, disease status, or physiological changes. Their value and timing must be aligned with the model’s causal and pharmacological interpretation.

The frozen engine uses record-level covariate values. SCM refits code the effect in the model and evaluate record-level likelihood. The posterior engine summarizes time-varying covariates at subject level using the configured rule, such as first or mean value. These are different estimands.

Method-specific handling of time-varying covariates

A contemporaneous biomarker can be affected by drug exposure, creating reverse causation. A postbaseline renal value may mediate toxicity rather than explain baseline clearance. Define lag, update time, interpolation, and whether the value is external to the PK/PD process.

Inspect trajectories, measurement frequency, missingness, and update timing relative to doses/observations. Subjects with more measurements can contribute differently. Mark time_varying in detailed configuration and document the posterior summary rule when comparing methods.

Do not expect frozen and posterior results to agree if one uses record values and the other a mean. Method disagreement may reflect feature definition rather than statistical instability.

Aligning values with pharmacology

A time-varying relationship requires a rule for which measurement influences each prediction. Same-row use, last observation carried forward, interpolation, baseline value, lagged value, and cumulative summaries answer different scientific questions. Ensure covariate timing cannot use information collected after the concentration it predicts. Acute laboratory changes may be consequences of treatment or disease progression rather than causes of parameter variation, creating time-dependent confounding. Plot each subject's covariate and dosing/observation times together, check impossible jumps, and document update rules at dose, event, and reset records. If the implementation supports only baseline covariates for a method, do not approximate a longitudinal hypothesis silently.

Common mistakes

  • Treating a changing covariate as baseline.
  • Using future values to predict earlier observations.
  • Ignoring drug-induced changes or reverse causation.
  • Comparing methods with different subject summaries as identical tests.
  • Leaving interpolation and missingness undocumented.

Checklist

  • Define biological timing and causal role.
  • Specify record-level update and missingness rules.
  • Mark time-varying status explicitly.
  • Record posterior summary behavior.
  • Interpret cross-method differences in light of feature definitions.

Further reading

Continue with method comparison, posterior stability, and Chapter 6 covariate timing.