Tutorials › Multiple Imputation by Chained Equations (MICE) › Aligning Covariate Values With Event and Censoring Times

Survival and Time-Varying Data · Tutorial 403 of 497

Aligning Covariate Values With Event and Censoring Times

Learn to build start-stop intervals that use only covariate information valid before each event or censoring time.

Advanced 10 min read

What You'll Learn

  • Define how covariate measurement times relate to risk intervals and their endpoints.
  • Apply a consistent rule for measurements tied with an event or censoring time.
  • Decide when a recorded value can validly cover an interval and when it must remain unknown.
  • Construct interval records without extending follow-up or covariate information past observed limits.
  • Identify alignment errors using timelines, interval durations, and terminal event indicators.

Why Time Alignment Matters

In survival data, a covariate value is useful for an event-time analysis only if it represents information available during the risk period being modelled. A measurement taken at one visit does not automatically describe every later interval. Likewise, a value recorded at the same time as an event may have been measured after the event. The data records must preserve these distinctions before missing covariate values are imputed.

This tutorial focuses on aligning observed covariate measurement times with each person's event or censoring time. It uses the start-stop representation introduced in the earlier material on start-stop data and interval splitting. The central rule is simple: an interval may use a covariate value only for the times during which that value is known, or justifiably assumed, to apply. An event or censoring time ends the observed risk history; it is not a reason to extend a value beyond that endpoint.

Definition: For person \(i\), let \(T_i\) be the observed follow-up endpoint, the earlier of the event time and censoring time, and let \(\Delta_i=1\) indicate an observed event and \(\Delta_i=0\) indicate censoring. Let \(X_i(t)\) denote a time-varying covariate at time \(t\). A start-stop record describes an interval of observed follow-up and assigns covariate information to that interval only when the information is valid for it.

State the Timing Assumptions First

A reliable alignment depends on knowing what the timestamps mean. Before constructing records, establish a common time origin, the units of time, the event and censoring times, and the times at which covariates were measured. Also establish what a measurement represents: a value at an instant, a value intended to remain valid until the next measurement, or a value known to apply over a stated validity period. These are different data-generating and recording conventions.

In particular, periodic measurement does not by itself prove that a covariate stayed constant between visits. Treating the value at one visit as applying until the next is a piecewise-constant representation and requires substantive justification, such as a treatment record showing no change in that period or a protocol that defines the covariate that way. If no such justification exists, the unmeasured portion is not made observed merely by carrying the last value forward. The earlier material on avoiding future-information leakage motivates using only information available at the relevant time; here, the additional task is to map that information onto the correct intervals.

Use one tie convention consistently. A useful convention is that a measurement at time \(t\) becomes available for intervals after \(t\). An event at time \(t\) is evaluated using covariate history available just before the event, often denoted \(X_i(t-)\). Thus, a measurement timestamped exactly at the event time is not used to predict that event unless the measurement process establishes that it was obtained before the event. If the actual ordering is known, record that ordering; if not, the conservative choice is not to use the tied measurement for the event.

With start-stop intervals written as \((a,b]\), the value assigned to a row is the value valid over that risk interval. A measurement at \(a\) can supply information for times after \(a\); it does not automatically describe time before \(a\). The interval must also end no later than \(T_i\). If a covariate's documented validity ends before the interval does, split the interval at that validity boundary or mark the later part as unknown.

A Construction Rule

1
Set each person's observed endpoint.
Record \(T_i\) and whether it is an event or censoring time. No risk interval for that observed follow-up may extend past \(T_i\).
2
Order the relevant times.
List follow-up start, covariate measurements, documented validity boundaries, and \(T_i\) on the same time scale. Resolve tied times using the measurement and event ordering, if known.
3
Split where the covariate status can change.
Make interval boundaries at measurement times and at any point where the value ceases to be known to apply. Do not split beyond the observed endpoint.
4
Assign only supported values.
For each interval, use the value documented as valid for that period. If support ends or is absent, represent the covariate as unknown rather than silently extending its last value.
5
Mark the terminal row.
Place \(\Delta_i=1\) only on the interval ending in an observed event. A censoring endpoint has \(\Delta_i=0\); earlier rows have no event at their stop time.

Worked Examples

Worked Example: Event After Two Documented Covariate Values

Suppose a hypothetical participant enters follow-up at time 0, has a covariate measured as 4 units at time 0 and as 7 units at time 6, and experiences the event at time 10. The protocol states that each measurement remains valid until the next measurement. Construct the records.

The stated validity rule supports using 4 units from time 0 up to the measurement at time 6, and 7 units after time 6 through the event at time 10. The intervals and their lengths are:

$$ (0,6]:\quad 6-0=6\text{ time units}; \qquad (6,10]:\quad 10-6=4\text{ time units}. $$
StartStopCovariate valueEvent indicator at stop
064 units0
6107 units1

The terminal event indicator appears only on the second row because the event occurs at time 10. The value 7 is supported up to that event by the stated validity rule. The record does not include any time after 10: no post-event covariate interval belongs to this person's observed risk history.

Worked Example: A Measurement Tied With an Event

Suppose another hypothetical participant has a covariate value of 5 units at time 0 and an event at time 8. A second covariate measurement is timestamped at time 8, but the records do not indicate whether it was taken before or after the event. Under the stated tie convention, what value is used for the event interval?

Because the ordering is unknown, the time-8 measurement cannot be established as available before the event. Use the supported value of 5 units for the event-ending interval, provided the protocol supports its validity up to time 8. Do not use the tied measurement to predict the event.

$$ (0,8]:\quad 8-0=8\text{ time units},\qquad X(8-)=5\text{ units},\qquad \Delta=1. $$

There is one event row, \((0,8]\), ending at the event. If the measurement log later establishes that the 8-unit-time measurement was taken before the event and is available for event-time prediction, the ordering rule can be changed accordingly and documented. If it was taken after the event, it cannot be used for that event. A timestamp alone does not settle this distinction.

Worked Example: Validity Ends Before Censoring

A hypothetical participant is censored at time 9. The covariate is measured at time 4 as 12 units, and documentation says that this value is valid for three time units after measurement, through time 7. No later value is observed. Assume there is no supported baseline value before time 4.

The covariate is unknown over \((0,4]\), since no value is documented for that interval. It is supported over \((4,7]\). After time 7, the value's documented validity has ended, so \((7,9]\) cannot be assigned 12 units merely because that was the last measurement. The durations are:

$$ 4-0=4,\qquad 7-4=3,\qquad 9-7=2\text{ time units}. $$
StartStopCovariate informationEvent indicator at stop
04Unknown0
4712 units0
79Unknown0

The participant is censored at time 9, so the terminal event indicator is 0. The final row ends at censoring; it does not imply that the participant remained under observed follow-up beyond time 9. The unknown intervals may be relevant to imputation, but alignment does not turn them into observed values.

Why the Endpoint and Covariate History Must Agree

The risk-set logic explains the alignment rule. A person contributes to an event-time analysis only while under observation and at risk. For an ordinary right-censored record with time origin 0, the at-risk indicator is \(Y_i(t)=1\) for \(0<t\leq T_i\), and is 0 after \(T_i\). A time-varying predictor for an event at time \(t\) must represent information available immediately before \(t\), not information recorded later.

$$ Y_i(t)=\mathbb{1}(0<t\leq T_i),\qquad \text{event-time predictor at }t:\ X_i(t-). $$

This gives a direct check on a constructed record. If a row ends at \(b\), it can describe risk only through \(b\), and the assigned covariate must be supported for the interval up to \(b\). If \(b=T_i\) and \(\Delta_i=1\), the event is at that endpoint; a measurement available only at or after \(b\) cannot be assumed to describe the pre-event history. If \(b=T_i\) and \(\Delta_i=0\), the record ends at censoring, with no observed event at that time.

This justification does not assert that a covariate is truly constant between measurements. It shows why the analysis record must not claim more temporal information than the measurement process supports. A piecewise-constant covariate history is a modelling representation; its intervals and values must be justified by how the variable was recorded or by an explicit assumption.

Checks, Alternatives, and Limitations

After aligning the records, check them as a timeline rather than treating the rows as an ordinary independent data table. Useful checks include:

  • Every interval has positive length: stop time is greater than start time.
  • Intervals follow chronological order, do not overlap, and cover only the intended observed follow-up.
  • The last stop time for each person equals \(T_i\), not a later measurement time.
  • There is one terminal event indicator for an observed event, on the row ending at the event time; censored histories have no event indicator of 1.
  • Values change at the recorded measurement or validity boundary, not at an unrelated row boundary.
  • Measurements tied with an event have an explicit ordering rule; unexplained ties are not automatically treated as pre-event values.
  • Unknown intervals remain visible as unknown. A complete-looking covariate column is not evidence that all values were observed or valid.

The alternatives differ in what they assume. Baseline-only analysis uses a baseline value throughout follow-up and does not represent later covariate changes. Carrying the last value forward can provide a piecewise-constant history, but only when continued validity is defensible; otherwise it fills gaps with unsupported information. Time-updated intervals represent observed changes more directly, while leaving periods without supported values as missing. These choices are not interchangeable data-cleaning details: they define different covariate histories for the analysis.

ApproachWhat it representsMain limitation
Baseline-onlyThe baseline covariate is used over follow-up.Later changes are not represented.
Carry the last value forwardA measured value is treated as continuing across later time.May claim persistence beyond its documented validity.
Time-updated intervalsValues are assigned to supported portions of follow-up, with boundaries at changes or validity limits.May leave unknown intervals and requires careful timing information.

In MICE, alignment is a preparation and data-definition issue as well as an imputation issue. An imputation procedure can draw plausible values for missing covariates under its assumptions; it cannot determine whether a timestamp was recorded before an event, establish an undocumented validity period, or justify extending follow-up. When one person contributes multiple interval rows, those rows also remain parts of that person's history, not separate people. The imputation setup must preserve the repeated-measure structure rather than treating duplicated person records as independent observations.

Common Mistakes

  • Wrong: “The last value is the best available value, so it should fill every later row.” Correction: Use it later only if the variable's definition or measurement protocol supports that period; otherwise retain an unknown interval.
  • Wrong: “The measurement and event share a timestamp, so the measurement predicts the event.” Correction: Establish the order. Without evidence that measurement preceded the event, do not use it for the event-time covariate history.
  • Wrong: “A measurement after censoring can fill the end of follow-up.” Correction: A later measurement does not extend the observed risk period or show what the covariate was before censoring.
  • Wrong: “Splitting at a visit makes the value valid up to the next visit.” Correction: Splitting creates rows, not evidence of persistence. The validity assumption must come from the variable's meaning or a defensible model.
Key takeaway: Align interval endpoints to the observed event or censoring time, and assign a covariate value only to periods for which it is known or explicitly justified to apply. Respect measurement-event ordering, and leave unsupported periods unknown rather than extending information by default.

Check Your Understanding

Answer each question using the timing and validity rules above. Brief solutions follow the questions.

  1. A participant has a value of 3 units at time 0, a documented value of 6 units at time 5, and an event at time 8. The protocol supports each value until the next measurement or the event. Give the intervals and event indicators.
  2. A covariate is measured at the exact censoring time. Can that measurement be used to describe earlier follow-up without further timing information? Why?
  3. A value measured at time 2 is documented as valid through time 4. The person is censored at time 7 and there is no later measure. What should be recorded for \((4,7]\)?
  4. Why is it incorrect to place an event indicator of 1 on every interval row for a person who experienced an event?

Solutions. (1) Use \((0,5]\) with value 3 and event indicator 0, then \((5,8]\) with value 6 and event indicator 1. The intervals have lengths \(5-0=5\) and \(8-5=3\) time units. (2) No. A measurement at censoring does not, by itself, establish the earlier covariate history, and its ordering relative to censoring may be unknown. Earlier values require their own support. (3) Record the covariate as unknown over \((4,7]\); its documented validity ends at 4, and censoring at 7 does not extend that validity. The terminal event indicator is 0. (4) The event occurs only at the endpoint of the terminal event row. Earlier intervals end without an event, so their event indicators are 0.

Clinical Biostats