From visit records to survival intervals
A time-varying covariate is observed at particular times, while a survival model uses the covariate value applying over each portion of a person’s risk time. A missing visit measurement therefore affects more than one cell in a data table: it may affect the covariate assigned to an interval and, in turn, the survival analysis. The essential sequence is to define valid intervals, impute a missing visit value using predictors that respect the timeline, and then reconstruct the interval-level data.
The example below uses a binary covariate, such as whether a hypothetical patient is receiving a treatment at a visit. The same data-structuring logic applies to other covariate types, though their imputation models differ. A visit-level record is not itself a survival interval. Intervals are formed by splitting follow-up at times when the covariate changes or can change, as well as at entry and the event or censoring time.
This representation requires an explicit timing convention. Here, a measurement recorded at time \(t\) applies from just after \(t\) until the next update, so a visit at time 2 begins the interval \((2,\ldots]\). A measurement made after an event or censoring time cannot describe an earlier risk interval. If a visit is known to have occurred after follow-up ended, it is excluded from the survival records.
A visit timeline and its interval representation
Worked Example: Splitting Follow-Up at Visits and an Event
Suppose a hypothetical patient enters follow-up at time 0, has covariate measurements at times 0, 2, and 5, and experiences the event at time 6. The covariate values are 0 at time 0, missing at time 2, and 1 at time 5. Under the stated convention, the visit at time 2 begins a new interval, even though its value has not yet been imputed.
| Start | Stop | Covariate at interval start | Event indicator |
|---|---|---|---|
| 0 | 2 | 0 | 0 |
| 2 | 5 | Missing | 0 |
| 5 | 6 | 1 | 1 |
The split points are 0, 2, 5, and 6. The event indicator is 1 only on \((5,6]\), because the event occurs at time 6. There is no interval after time 6: follow-up has ended. The missing value at time 2 must be imputed before the second interval can be used with a fully observed covariate.
Splitting at covariate updates preserves the intended risk-set information when the covariate is treated as piecewise constant. To see why, let \(\lambda_0(t)\) be a baseline hazard and \(\beta\) the coefficient for a covariate that is constant at \(x\) over one interval \((a,b]\). Under a proportional hazards model, the interval’s event-time likelihood contribution has the form
Here \(d\) is the interval event indicator, and the expression assumes an event at the endpoint when \(d=1\). If the covariate changes at an interior time, using one value across the entire interval would apply the wrong hazard to part of the risk time. Splitting at that change allows the hazard contribution to use the applicable covariate on each segment. This is the justification for aligning covariate updates with start-stop boundaries; it does not justify filling in a missing visit value by carrying the last recorded value forward.
Imputing a missing visit value with temporal predictors
For a binary visit-level covariate \(Y_{ij}\), a possible conditional imputation model is logistic regression. In a longitudinal setting, predictors may include the previous covariate value, time since the previous visit, baseline characteristics, and suitable survival-outcome information. Repeated observations from the same person are dependent, so the model must also account for person-level dependence, for example through a person-specific random intercept or another defensible clustered-data approach. Treating all visit rows as independent observations without justification can understate uncertainty and distort the conditional model.
A temporal predictor must be defined at the target visit. For a forward, time-respecting imputation, the previous covariate value and elapsed time are available predictors; a measurement made after the target time is not. In retrospective imputation, later observed measurements can sometimes provide legitimate information about a missing earlier value, but their use requires a model and missingness assumptions that support it. They must not be used when they were recorded after the person’s event or censoring time, nor should they be included automatically as if they were available at the target time. The relevant question is whether the predictor is appropriate for the imputation target and analysis, not simply whether it is present in the data file.
Worked Example: Calculating a Binary Imputation Probability
Consider the missing value at time 2 in the hypothetical timeline above. Suppose a fitted conditional model uses the previous covariate value \(Y_{\mathrm{prev}}\), elapsed time \(\Delta t\) in time units, a baseline indicator \(B\), and cumulative baseline hazard \(H_0(t)\) through the target visit. For illustration, assume the model coefficients are \(-1.00\), \(0.80\), \(0.30\), \(0.50\), and \(0.40\), respectively:
For this patient, suppose \(Y_{\mathrm{prev}}=0\), \(\Delta t=2\), \(B=1\), and \(H_0(2)=0.20\). The linear predictor is
The conditional probability is therefore
This is a probability under the stated illustrative model, not a certainty about the missing value. For a stochastic imputation, draw \(U\sim\operatorname{Uniform}(0,1)\) and set the imputed value to 1 if \(U<p\), and to 0 otherwise. If this draw gives \(U=0.41\), then \(0.41<0.545\), so the imputed value is 1. A proper MICE analysis also represents uncertainty in the fitted model parameters; repeatedly inserting the conditional mean or most likely category would not provide the same imputation variability.
The model’s predictors and assumptions need substantive checking. The outcome-related information used in the earlier material on Cox-model imputation with cumulative hazard can help preserve associations with survival, but it does not remove the need to define the target time correctly. In particular, \(H_0(t)\) must refer to the target visit time, and any event or censoring information included as a predictor must be used within a justified survival-imputation strategy. The probability calculation above illustrates prediction from a specified model; it is not evidence that the model is correctly specified or that missingness is MAR.
Reconstructing the imputed start-stop data
Worked Example: Rebuilding the Patient’s Survival Records
Use the imputed value 1 at time 2 from the preceding example. The value observed at time 5 remains 1, and the event remains at time 6. The interval rows are reconstructed from the original visit and follow-up times, assigning each interval the value applying at its start.
| Start | Stop | Covariate value | Event indicator | Check |
|---|---|---|---|---|
| 0 | 2 | 0 | 0 | Pre-update risk time |
| 2 | 5 | 1 | 0 | Imputed visit value applies |
| 5 | 6 | 1 | 1 | Event at follow-up endpoint |
The reconstructed data have total observed risk time \(2+3+1=6\) time units, matching follow-up from 0 to 6. The event indicators sum to 1, matching the one event. The time-2 imputation changes the covariate on \((2,5]\), but it does not change the visit times, follow-up endpoint, or event assignment.
In a complete analysis, the construction is repeated separately for each imputed dataset. Each completed dataset must preserve the same observed follow-up information and the same interval boundaries unless the imputation model explicitly imputes a time or event variable. Fit the survival model to each completed dataset, then combine estimates using multiple-imputation rules rather than treating the \(m\) completed datasets as independent studies or averaging their raw data into one file.
For each person, identify entry, valid covariate visit times, and the event or censoring time. Exclude measurements after follow-up ends.
Split follow-up at each applicable covariate update and at the terminal time. Record the covariate value and event indicator for each interval.
Use a suitable conditional model with temporal predictors, account for repeated observations within people, and draw values with parameter uncertainty represented.
Apply each imputed visit value over its defined interval, then check chronology, risk time, event counts, and predictor availability.
Diagnostics, alternatives, and limitations
Before fitting a survival model, check that every interval has positive length, that intervals for a person are ordered and nonoverlapping, and that their union covers exactly the observed at-risk time. Confirm that the event indicator is 1 at most once per person for a single-event analysis and that it is located at the event endpoint. Compare observed and imputed covariate distributions by visit time and by relevant baseline or outcome strata. For chained equations, also inspect whether the imputed distributions and key summaries stabilize across iterations; the following material on diagnosing imputed survival covariates across follow-up develops those diagnostics further.
Several approaches are not interchangeable. Complete-case analysis drops records with missing covariates and can lose precision or introduce bias if its assumptions fail. Last observation carried forward assigns a previous value to a missing measurement without reflecting uncertainty or change; it is not a stochastic imputation model. A single deterministic conditional prediction likewise suppresses uncertainty. Multiple imputation by chained equations instead generates multiple plausible completed datasets under specified conditional models, but it does not guarantee valid results when the models, missingness assumptions, temporal structure, or interval construction are wrong.
A piecewise-constant interval representation is itself an approximation to covariate behavior between observations. It is reasonable only when that convention is defensible for the measurement process and scientific question. Sparse visits, rapid covariate changes, informative visit timing, severe lack of overlap in predictor patterns, or misspecified dependence among a person’s repeated measurements can undermine the imputation. MAR is an assumption about missingness conditional on observed information, not a property established by a plausible-looking imputed dataset. When missingness may depend on the unobserved value after conditioning, sensitivity analysis is needed.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- A patient enters at time 0, has visits at times 3 and 7, and is censored at time 9. How many intervals are formed if the covariate may change at either visit, and what are their boundaries?
- In a single-event analysis, where should an event at time 8 be coded for intervals \((0,3]\), \((3,7]\), and \((7,8]\)?
- A binary imputation model gives \(p=0.30\), and a stochastic draw gives \(U=0.62\). What value is imputed under the stated threshold rule?
- Why is replacing every missing value with its conditional probability not equivalent to drawing a binary value?
- Name two checks that can identify an incorrectly reconstructed start-stop dataset.
Solutions. (1) Three intervals: \((0,3]\), \((3,7]\), and \((7,9]\); the visit at 3 and 7 starts the following interval under the stated convention. (2) The event is coded 1 on \((7,8]\); earlier intervals have indicator 0, and follow-up stops at 8. (3) Since \(0.62\) is not less than \(0.30\), impute 0. (4) The probability is a conditional expectation, not a possible binary observation; replacing values by probabilities removes the intended categorical variation and fails to represent imputation uncertainty. (5) Examples include checking for positive interval lengths and ordered, nonoverlapping intervals; verifying total at-risk time equals observed follow-up; and confirming the event is assigned once at the correct endpoint.