24.12 Time-varying covariates and parameter limitations
Learners require one feature row per subject. A time-varying covariate is therefore summarized by features.time_varying_summary, currently first or mean. This differs fundamentally from the frozen engine, which can use record-level values in likelihood derivatives.
Choose the summary to match the estimand. Baseline renal function and mean on-treatment renal function answer different questions and can be affected by treatment or disease evolution. Do not silently use a mean when future measurements would leak information into earlier predictions.
Posterior selection also requires a target ETA. Covariates on fixed parameters without random effects cannot be learned by this engine. Adding an ETA merely to enable screening changes the model and must be scientifically justified and refitted.
Common mistakes
- Assuming posterior features update at every record.
- Using post-outcome covariate values without causal/timing review.
- Adding an ETA solely as a computational workaround.
- Comparing frozen and posterior results without noting time summaries.
- Omitting summary rules from reports.
Checklist
- Define the subject-level time-varying summary.
- Verify temporal alignment and leakage risk.
- Confirm every target parameter has an ETA.
- Compare methods using compatible estimands.
- Document unsupported relationships explicitly.
Further reading
Revisit time-varying covariates, feature registry, and Chapter 23's frozen candidate construction.