Why Recurrent-Event Records Need Their Own Structure
A participant can experience an event, return to the risk set, and experience another event. Covariates may be recorded once for that participant, once per event spell, or repeatedly during follow-up. These are different data structures. If they are flattened into an undifferentiated set of rows for multiple imputation by chained equations (MICE), the resulting imputations can detach covariate values from the event spell and time interval they describe.
The goal here is to set up covariate imputation, not to impute a new event history. Treat observed event order, event times, censoring information, and the definition of each risk period as part of the record structure. Impute the missing covariate values at the level at which those values are defined, using predictors that preserve their relationship to that structure.
Index participants by \(i\), spells by \(k\), and intervals within a spell by \(j\). For a participant with event times \(T_{i1}, T_{i2}, \ldots\), define the calendar gap to event \(k\) as \(G_{ik}=T_{ik}-T_{i,k-1}\). The first event requires a specified origin, such as study entry, in place of \(T_{i0}\). If someone is temporarily not at risk, that off-risk period remains part of calendar gap time but is not counted as at-risk duration.
Define the Imputation Unit Before Building the Model
A baseline covariate has one value per participant, even if the analysis data repeat that value on many interval rows. A spell-level covariate has a value for each relevant participant-spell combination. An interval-level covariate can change within a spell and has a value for each participant-spell-interval combination. The imputation unit must match the variable’s meaning: repeatedly copying a baseline value does not turn it into an interval-level variable.
MICE fits a sequence of conditional models, one for each incomplete variable. In this setting, the conditional model also needs enough structure to distinguish participants, spell numbers, and the time at which a value applies. Useful predictors can include spell number, previous observed covariate values, prior event history, and appropriately aligned time information. Include predictors that are relevant to the analysis and missingness, but do not attach a value to a period before or after the period it describes. The earlier material on aligning covariates with event and censoring times is useful for making this choice.
A defensible setup typically requires that recorded event order and interval boundaries are correct; each covariate’s time reference is defined; and the conditional imputation models include relevant observed information without assigning it to the wrong time. For inference under a missing-at-random assumption, the variables and history that jointly explain missingness and the missing covariate must be represented in the observed predictors. There must also be adequate observed data to estimate the conditional distributions in the parts of the data where imputations are needed. These conditions cannot be guaranteed merely by choosing a MICE routine.
Worked Example: Constructing Ordered Spells and Risk Intervals
Suppose a hypothetical participant enters follow-up on day 0, has events on days 4 and 11, and is temporarily not at risk from day 7 through day 8. The participant is at risk from day 0 to day 4, from day 4 to day 7, and from day 8 to day 11. Use half-open start-stop intervals \((\text{start},\text{stop}]\) for illustration, with the event assigned to the interval ending at its event time.
Spell 1. The first event occurs on day 4. With day 0 as the origin, its gap is \(4-0=4\) days. Its at-risk interval is \((0,4]\), with 4 days at risk.
Spell 2. The second event occurs on day 11, so the calendar gap from the first event is \(11-4=7\) days. Its at-risk intervals are \((4,7]\) and \((8,11]\). Their durations are \(7-4=3\) days and \(11-8=3\) days, giving \(3+3=6\) days at risk during a 7-day calendar gap.
The gap is 7 days, not 6, because the off-risk day still elapses on the calendar. A record that replaces the two intervals with one continuous interval \((4,11]\) wrongly counts the off-risk time as at risk. A record that calls the gap 6 days instead confuses risk duration with elapsed time.
Set Up Chained Equations Without Losing Spell Order
A useful data set retains a participant identifier, spell number, interval start and stop, at-risk status or interval definition, and event information attached to the correct interval. The exact storage format can vary, but these fields must remain recoverable. For a spell-level covariate, use one logical value per participant and spell in the imputation model; for an interval-level covariate, preserve its interval-specific values and boundaries. Baseline variables should not acquire different imputed values simply because a participant has several spells.
For each incomplete covariate, specify a conditional model suited to its scale: for example, a logistic model for a binary value or a linear model for a continuous value. Include participant-level and time-ordered predictors as appropriate. Prior values may be useful for a time-varying covariate, but a later measured value should not be relabeled as an earlier one. If event history is used as a predictor, its spell and time reference must be explicit. Include relevant observed outcome information when needed for the analysis and missingness model, while avoiding indiscriminate use of records that do not correspond to the covariate’s temporal context.
Repeated rows also require care in fitting the conditional models. If a baseline covariate is copied onto every interval row and those rows are treated as independent observations, participants with more intervals can contribute more times to its imputation model. That changes the effective weighting and can make the imputation target differ from a participant-level conditional distribution. Use an approach that imputes the baseline once per participant, or otherwise accounts for the repeated representation, rather than treating copies as new people.
Worked Example: Imputing a Binary Spell-Level Covariate
Consider a hypothetical binary covariate indicating whether a participant used a particular medication at the start of a spell. It is missing for spell 2. Suppose an illustrative fitted conditional model for medication use has linear predictor \(\eta=-0.4+0.7X_{\mathrm{prior}}+0.2(k-1)-0.1G/5\), where \(X_{\mathrm{prior}}\) is the observed medication indicator at the previous spell, \(k\) is spell number, and \(G\) is the calendar gap in days.
For a participant with \(X_{\mathrm{prior}}=1\), \(k=2\), and \(G=6\) days, substitute the values: \(\eta=-0.4+0.7(1)+0.2(2-1)-0.1(6/5)=-0.4+0.7+0.2-0.12=0.38\). The conditional probability of medication use is therefore \(P(X=1\mid\text{predictors})=1/(1+\exp(-0.38))\approx0.5939\).
For illustration, if a Bernoulli draw uses a uniform random number \(u=0.41\), then \(0.41<0.5939\), so this draw imputes medication use as 1 for this participant’s second spell. In an actual MICE analysis, uncertainty in the conditional-model parameters must also be represented across imputations; this single calculation illustrates the covariate draw, not a complete multiple-imputation analysis. The imputed value belongs to spell 2, not to every interval row in the participant’s entire record.
Why Row-Level Duplication Can Change the Imputation
The weighting problem can be seen directly. Suppose \(X_i\) is a baseline covariate for participant \(i\), and \(Z_{ij}\) is a predictor recorded on interval row \(j\). If a model is fitted by treating every copied baseline value as a separate observation, its contribution to the log likelihood has the form \[ \ell_{\mathrm{rows}}(\beta)=\sum_i\sum_{j=1}^{m_i}\log f(X_i\mid Z_{ij};\beta), \] where \(m_i\) is the number of rows for participant \(i\). A participant with five interval rows can then contribute five terms, while one with a single row contributes one.
That is not generally the same as a model with one contribution per participant, \[ \ell_{\mathrm{participants}}(\beta)=\sum_i\log f(X_i\mid W_i;\beta), \] where \(W_i\) is a participant-level predictor summary or another correctly defined participant-level predictor set. The two expressions differ because the first weights participants through their row counts and uses interval-specific predictors repeatedly. They coincide only under special conditions, not merely because \(X_i\) is copied identically. Thus the repeated-row representation can alter the fitted conditional distribution and the imputed baseline values. The remedy is to align the imputation unit and model with the variable’s level, rather than assuming duplicated rows are harmless.
Worked Example: Separating Baseline and Interval-Level Values
Suppose a hypothetical participant has one missing baseline biomarker and three observed follow-up intervals. The baseline biomarker is defined at enrollment, while a blood-pressure measurement is interval-specific. In the analysis file, the baseline biomarker is copied to all three rows; blood pressure is recorded separately for each interval.
The appropriate imputation target for the biomarker is one participant-level value. If it is imputed independently on all three rows, the completed record could contain three different enrollment biomarker values, which contradicts the variable definition. Instead, impute one value and link it to all three rows for analysis.
For blood pressure, three values can be appropriate because the measurement is defined separately for each interval. If the second interval’s measurement is missing, its imputation should use predictors aligned to that interval, such as the interval number, relevant prior measurement, and interval-specific history. It should not be filled by copying the baseline biomarker or the third interval’s blood pressure. The distinction follows from the measurement level, not from how many rows happen to appear in the file.
Checks, Alternatives, and Limitations
Before fitting chained equations, and again after each completed data set is created, check that the records still describe a possible event history. These checks concern structure as well as the distribution of the imputed covariates.
- Within each participant, event numbers and event times must remain in the intended order; a later-numbered event must not precede an earlier one.
- Gap times should agree with event times and the stated origin. For consecutive events, verify \(G_{ik}=T_{ik}-T_{i,k-1}\); do not substitute summed risk duration for calendar elapsed time.
- At-risk intervals should have valid start and stop times, should not overlap in ways the study design forbids, and should exclude documented off-risk periods.
- Check that a baseline value is constant across a participant’s repeated analysis rows and that spell- or interval-level values are attached to the intended spell or interval.
- Inspect missingness and observed/imputed distributions by spell number and follow-up time. Implausible abrupt changes, empty predictor categories, or very sparse later spells may indicate that a conditional model is unstable or that the structure has been misrepresented.
A participant-level wide format can be convenient for baseline variables, but it can become unwieldy when participants have different numbers of events and spell-specific covariates. A long start-stop format represents risk intervals naturally, but a generic row-based imputation can over-weight people with many rows or produce inconsistent copies of baseline values. Complete-case analysis avoids specifying imputation models but discards participants with missing covariates and may be biased when inclusion depends on observed or unobserved data. Carrying the last observed value forward is not a substitute for imputation: it imposes an unverified constancy assumption and does not represent uncertainty.
No arrangement of rows guarantees that chained equations are correctly specified. The conditional models may be misspecified, data may be too sparse for some later spells, and the missingness process may depend on unobserved values even after conditioning on recorded predictors. Recurrent-event records can also be too complex for a simple imputation model to preserve all dependence and time structure. Treat the event-history checks as necessary diagnostics, not proof that the imputation assumptions hold.
Record participant, event order, spell number, event times, censoring information, and the study’s risk intervals.
State whether it is participant-level, spell-level, or interval-level, and identify the time at which each value applies.
Use relevant observed history and time information with explicit alignment to the value being imputed; choose a model suited to the covariate scale.
Check event order, gap calculations, risk intervals, within-participant consistency, and distributions across spells.
Check Your Understanding
Answer each question, then compare with the solutions below.
- A participant has events on days 3 and 9, with no off-risk time between them. What is the second calendar gap?
- A baseline covariate is copied onto four interval rows. Should it be imputed as four unrelated interval-level values? Why or why not?
- Between two events, a participant is at risk for 2 days, off risk for 1 day, and then at risk for 3 days. Give the calendar gap and total at-risk duration.
- Name two structural checks that can reveal an invalid completed recurrent-event record.
Solutions. (1) The gap is \(9-3=6\) days. (2) No. It is one participant-level value and should remain constant across the participant’s rows; separate row imputations could create contradictory baseline values and may give that participant excessive weight. (3) The calendar gap is \(2+1+3=6\) days, while at-risk duration is \(2+3=5\) days. (4) Examples include checking that event times increase in event-number order and that interval boundaries exclude off-risk time; one should also verify gap calculations and baseline consistency.