Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Pooled Landmark Models Across Multiple Times

Landmarking as an Alternative · Tutorial 629 of 697

Pooled Landmark Models Across Multiple Times

Learn to fit pooled landmark regressions across multiple times while handling within-patient dependence and interpreting a prediction for a specified landmark and horizon.

Intermediate 11 min read

What You'll Learn

  • Define the stacked landmark dataset and its eligible records
  • Specify pooled logistic models with landmark-specific intercepts and effects
  • Distinguish common effects from effects that vary by landmark time
  • Explain why records from one patient are dependent
  • Use patient-clustered uncertainty estimates for pooled regression
  • Calculate and interpret a risk prediction at a selected landmark

Why Pool Landmark Times?

A landmark analysis predicts risk among patients who are still eligible at a specified time, using information available by that time. When predictions are needed at several landmark times, fitting a separate regression at every time is one option. Pooling the eligible records into one regression is another: it can use information across times and provide a single framework for estimating landmark-specific risks. The crucial detail is that one patient may contribute more than one record, so the stacked rows are generally not independent observations.

The pooled model must also preserve the meaning of the prediction. A risk prediction for a patient eligible at time \(t_k\) concerns the event over a stated future horizon, conditional on eligibility and predictor information at \(t_k\). It is not an unconditional risk from the start of follow-up.

Definition: Let \(t_1,\ldots,t_K\) be landmark times and let \(h\) be a fixed prediction horizon. For patient \(i\) at landmark \(t_k\), let \(R_{ik}=1\) indicate eligibility for prediction at that landmark, \(X_{ik}\) denote the covariates available by \(t_k\), and \(Y_{ik}=1\) indicate the defined event within \((t_k,t_k+h]\). A stacked landmark dataset contains one row for each eligible patient-landmark pair \((i,k)\). A patient can therefore contribute multiple rows.

Eligibility must be determined separately at each landmark, typically requiring that the patient is alive and has not yet experienced the event of interest at \(t_k\). The event indicator must refer to the same specified horizon and event definition for every row. If follow-up is censored before the horizon, the binary outcome may not be fully observed; simply coding such a row as no event is generally incorrect. The analysis then needs an appropriate approach to incomplete outcome ascertainment, such as a justified censoring adjustment.

Building the Pooled Regression

A basic pooled logistic regression models the probability of the horizon event using landmark time and the covariates recorded at that time. With a separate intercept for each landmark, a common-slope model is

$$ \operatorname{logit}\{P(Y_{ik}=1\mid R_{ik}=1,X_{ik})\} =\alpha_k+\beta^\mathsf{T}X_{ik}. $$

Here \(\operatorname{logit}(p)=\log\{p/(1-p)\}\), \(\alpha_k\) is the intercept for landmark \(t_k\), and \(\beta\) is a vector of covariate effects constrained to be the same across landmarks. The landmark-specific intercepts allow the baseline event odds to differ by time. The common-slope assumption is substantive: a one-unit covariate contrast has the same conditional log-odds association at each landmark.

If effects may differ by landmark, include interactions between landmark indicators and covariates. Equivalently, write

$$ \operatorname{logit}\{P(Y_{ik}=1\mid R_{ik}=1,X_{ik})\} =\alpha_k+\beta_k^\mathsf{T}X_{ik}. $$

This more flexible model estimates separate covariate slopes at each landmark. A pooled regression is therefore not automatically a model with identical effects over time: the chosen parameterization determines which features are shared. With enough data, interactions can be assessed and retained when needed. Sparse eligible risk sets, however, may make fully landmark-specific effects unstable.

Worked Example: Constructing Stacked Landmark Records

Suppose the landmarks are 6 and 12 months, with a 3-month prediction horizon. Three hypothetical patients have the following eligibility and horizon outcomes. “Yes” in the outcome column means an event occurred within the specified 3-month horizon after that landmark.

PatientEligible at 6 months?6-month horizon outcomeEligible at 12 months?12-month horizon outcome
AYesYesNoNot applicable
BYesNoYesYes
CYesNoYesNo

The stacked dataset has five rows: patients A, B, and C at 6 months, and patients B and C at 12 months. Patient A contributes no 12-month row because A is not eligible then. Patient B contributes two rows because B is eligible at both landmarks. Those rows have different risk sets, covariate measurements, and follow-up intervals; they are not duplicate copies of one outcome. In a model with landmark-specific intercepts, each row uses the intercept for its own landmark.

Dependence Within a Patient

Rows from different patients can often be treated as independent, conditional on the model and sampling design. Rows from the same patient generally cannot. They may share unmeasured characteristics, and a patient’s later eligibility and covariates are related to that patient’s earlier history. Consequently, the ordinary logistic-regression standard error that treats every stacked row as independent can be too small or otherwise misleading.

A common approach is to fit the pooled regression while using a patient-clustered sandwich variance estimator. Let \(z_{ik}\) be the design vector for a row, including its landmark terms and covariates, and let \(\hat p_{ik}\) be its fitted probability. In an unweighted logistic model, the row score at the fitted coefficients is \(u_{ik}=z_{ik}(Y_{ik}-\hat p_{ik})\). Sum these scores within patient to obtain \(U_i=\sum_{k:R_{ik}=1}u_{ik}\). The sandwich variance has the form

$$ \widehat{\operatorname{Var}}(\hat\theta) =H^{-1}\left(\sum_{i=1}^{N} U_iU_i^\mathsf{T}\right)H^{-1}, \qquad H=\sum_{i=1}^{N}\sum_{k:R_{ik}=1} \hat p_{ik}(1-\hat p_{ik})z_{ik}z_{ik}^\mathsf{T}, $$

where \(\hat\theta\) collects the fitted regression coefficients. The middle term uses each patient’s total score, so it allows arbitrary dependence among that patient’s rows under the working model. It does not require rows within a patient to be independent. The usual large-sample justification relies on having a sufficiently large number of independent patient clusters and a correctly specified mean model; a small number of clusters can make the sandwich approximation unreliable.

A short justification

The pooled logistic fit solves the estimating equation \(\sum_i U_i(\theta)=0\). If patients are independent, the variability of this total score is estimated by summing the outer products of the patient-level scores, \(\sum_i U_iU_i^\mathsf{T}\). Linearizing the estimating equation around the true parameter gives an approximate coefficient error equal to the inverse sensitivity matrix times the total score. Taking the variance of that approximation yields the sandwich form above. If instead each row’s score were treated as a separate independent contribution, cross-products between rows from the same patient would be omitted, which is why row-wise independence-based uncertainty estimates need not be valid.

Worked Example: Comparing Clustered and Row-Wise Standard Errors

For a simplified one-coefficient illustration, suppose the fitted model has sensitivity \(H=25\) and four patient-level score contributions \(U_1=2\), \(U_2=-1\), \(U_3=3\), and \(U_4=-4\). These sum to zero, as expected for a fitted score equation. Their squared sum is

$$ \sum_{i=1}^{4}U_i^2 =2^2+(-1)^2+3^2+(-4)^2 =4+1+9+16=30. $$

The cluster-sandwich variance and standard error are therefore

$$ \widehat{\operatorname{Var}}(\hat\theta)=\frac{30}{25^2} =\frac{30}{625}=0.04800, \qquad SE(\hat\theta)=\sqrt{0.04800}=0.2191. $$

The corresponding model-based standard error under an independent-score calculation would be \(1/\sqrt{25}=0.2000\). In this hypothetical calculation, clustering increases the estimated standard error. That direction is not guaranteed in every dataset. Also, four clusters are far too few for this numerical sandwich approximation to be reassuring in practice; the example illustrates the calculation, not a recommendation to rely on inference from four patients.

Prediction at a Specified Landmark

To report an absolute risk, select a landmark \(t_k\), the corresponding covariate values \(x\), and the horizon \(h\), then calculate the linear predictor for that landmark and transform it with the inverse-logit function. In a model with landmark-specific slopes, the prediction is

$$ \hat p_k(x) =\frac{\exp(\hat\alpha_k+\hat\beta_k^\mathsf{T}x)} {1+\exp(\hat\alpha_k+\hat\beta_k^\mathsf{T}x)}. $$

This is the estimated probability of the defined event within the horizon among patients eligible at \(t_k\) with covariates \(x\), under the fitted model. It is not the probability of being event-free from the original study baseline. For a common-slope model, replace \(\hat\beta_k\) with \(\hat\beta\). Clustered standard errors address uncertainty in estimation; they do not change the fitted probability formula.

Worked Example: Calculating Risk at One Landmark

Suppose a pooled logistic model for a hypothetical 90-day event has landmark-specific intercepts and biomarker slopes. At 6 months, let \(\hat\alpha_6=-2.00\) and \(\hat\beta_6=0.60\); at 12 months, let \(\hat\alpha_{12}=-1.50\) and \(\hat\beta_{12}=0.20\). The biomarker \(x\) is measured in standardized units at the landmark. For a patient with \(x=2\) who is eligible at 12 months, the relevant linear predictor is

$$ \hat\eta_{12}=-1.50+(0.20)(2)=-1.10. $$

Thus the predicted 90-day event risk at 12 months is

$$ \hat p_{12}(2) =\frac{\exp(-1.10)}{1+\exp(-1.10)} =\frac{0.3329}{1+0.3329} =0.2497. $$

The model estimates a 24.97% risk over the next 90 days for an eligible patient with this biomarker value at 12 months. It would be incorrect to use the 6-month coefficients for this prediction, or to describe 24.97% as risk over the first 90 days after baseline.

Assumptions, Diagnostics, and Alternatives

Pooling is useful only when the data structure and model match the prediction target. Check that eligibility is applied at each landmark; covariates use information available by that landmark; the horizon and event definition are clear; and censoring has not been mistaken for absence of an event. The logistic mean model should also be adequate. Assess calibration by landmark, compare observed and predicted event frequencies across meaningful risk groups, and examine whether residual patterns or estimates suggest that a common covariate slope is untenable. Sparse events at a particular landmark, extreme fitted probabilities, and unstable interaction estimates are warning signs.

The principal alternatives have different trade-offs. Separate regressions at each landmark allow all coefficients to vary, but may be inefficient and difficult to compare when some risk sets are small. A pooled model with common slopes is more parsimonious, but imposes the same covariate associations across times. Landmark-by-covariate interactions offer a middle ground by allowing selected effects to vary. A model with patient-specific random effects is another possible way to represent dependence, but its assumptions and interpretation differ from a cluster-robust marginal analysis; it should not be treated as a routine substitute without considering the target prediction and the model’s assumptions.

Cluster-robust standard errors do not repair a misspecified risk model, incorrect eligibility rules, informative missingness, or unaddressed censoring. Nor do they make predictions at different landmarks interchangeable. They adjust uncertainty for within-patient dependence under appropriate large-sample conditions. A pooled analysis also remains limited by the information in each landmark risk set: a large total number of stacked rows can conceal few independent patients or few events at a particular time.

Common pitfall: “There are 1,000 stacked rows, so the analysis has 1,000 independent observations.” This is wrong when some patients contribute more than one row. The correction is to identify the patient as the independent cluster for variance estimation, and to report predictions for the specific landmark and horizon to which they refer.

Check Your Understanding

Answer each question, then compare your reasoning with the brief solutions below.

  1. A patient is eligible at 6 and 12 months. How many rows does that patient contribute to a stacked dataset containing both landmarks, and what must be accounted for in inference?
  2. In a common-slope pooled logistic model, what does a shared \(\beta\) assume about the covariate association across landmark times?
  3. For a 12-month landmark model, the fitted linear predictor is \(-0.40\). Calculate the estimated event risk over the model’s stated horizon.
  4. Why is it generally inappropriate to code a patient censored before the prediction horizon as having no event within that horizon?
  5. What does patient-clustered sandwich variance address, and name one problem it does not address.

Solutions. (1) The patient contributes two rows; inference must account for dependence between them by clustering on patient or using another justified dependence model. (2) It assumes the covariate has the same conditional log-odds slope at every landmark. (3) The risk is \(\exp(-0.40)/\{1+\exp(-0.40)\}=0.4013\), or about 40.13% over the stated horizon among patients eligible at 12 months with the specified covariates. (4) Censoring before the horizon leaves the event status over the full horizon unknown, so coding it as no event can misclassify the outcome. (5) It adjusts standard-error estimation for within-patient dependence under large-sample conditions; it does not fix an incorrect mean model or unresolved censoring.

Clinical Biostats