Why Weight a Discrete-Time Survival Model?
A discrete-time survival model represents follow-up as a sequence of intervals and models the probability of an event in each interval among those who have not yet experienced it. If some people drop out, however, the observed risk set can become unrepresentative: people with particular histories may be more likely to leave, and those histories may also predict the event. Inverse-probability-of-censoring weighting (IPCW) lets observed person-periods represent the full target population under appropriate assumptions.
This tutorial focuses on fitting the event-hazard model after constructing censoring weights. It is important to separate two tasks: the censoring weights address selection caused by loss to follow-up; the event model describes the target survival distribution. Censoring weights alone do not adjust confounding of treatment.
The time-ordering convention here is that event status for interval \(t\) is ascertained before a censoring event that would prevent observation of that status. Thus a subject who has an observed event in interval \(t\) contributes that event row, but contributes no later rows. A study using a different within-interval ordering must define its rows and censoring probabilities consistently.
The Weighted Person-Period Pseudo-Likelihood
Let \(H_{it}\) denote the observed history available before the censoring decision relevant to interval \(t\). For a subject still followed immediately before interval \(j\), write \(p_{ij}\) for the conditional probability of remaining observed through the next required ascertainment, given that history. The cumulative probability of observation through interval \(t\), conditional on the sequential history, is the product of these probabilities. The unstabilized censoring weight is its inverse:
These probabilities are modeled among those still observed, using the histories available at each step. Under sequential independent censoring, the conditional probabilities based on observed histories correctly represent the corresponding probabilities needed for weighting. Stabilized weights replace the numerator \(1\) with a specified numerator probability; their interpretation depends on that numerator and the outcome model. For the basic derivations below, use unstabilized weights.
Let \(h_{it}(\beta)=P(T_i=t\mid T_i\geq t,\text{ modeled predictors})\) be the event hazard specified by a model with parameter \(\beta\). For example, a pooled logistic model may use \(\operatorname{logit}\{h_{it}(\beta)\}=\alpha_t+\beta_A A_i\), where \(\alpha_t\) represents interval-specific baseline hazards and \(A_i\) is a treatment indicator. The IPCW-weighted log-likelihood contribution is a weighted Bernoulli log-likelihood for each observed at-risk row:
This is a pseudo-likelihood, not the ordinary likelihood of the observed data: its rows are reweighted to represent the target follow-up distribution. Its score is obtained by differentiating this expression with respect to \(\beta\). A common implementation fits a Bernoulli regression to the observed person-period rows using \(W_{it}\) as the case weight, with a subject contributing only while event-free and observed.
Why Weighting Recovers the Full-Data Person-Period Contributions
The key fact is an inverse-probability identity. For a fixed interval, suppose \(g_{it}\) is any integrable quantity defined for the full-data history needed at that interval. Let \(\pi_{it}\) be the conditional probability of being observed through interval \(t\), given that history. Sequential independent censoring means that the same probability is correctly represented by the censoring model based on the observed history. Then:
To verify the result, condition on the full history defining \(g_{it}\). By the sequential independent censoring assumption, the conditional expectation of \(O_{it}\) given that history is \(\pi_{it}\). The weight is fixed given the same history, so
Taking expectations of both sides gives the identity. Applied to a person-period likelihood or score contribution among those event-free at the interval's start, this says that the expected weighted observed contribution equals the expected full-data contribution. Positivity matters because the inverse is undefined when \(\pi_{it}=0\), and extremely small values make the contribution unstable.
For a correctly specified hazard model, the expected full-data Bernoulli log-likelihood is maximized at the true hazard. At each history with true hazard \(h_0\), the difference between its expected log-likelihood at a proposed hazard \(h\) and at \(h_0\) is
with equality only when \(h=h_0\), for hazards strictly between zero and one. This is the nonpositivity of the Bernoulli Kullback-Leibler divergence. The inverse-probability identity therefore makes the expected weighted criterion target the same hazard criterion as complete follow-up. Under independent subjects, suitable integrability and positivity, consistent nuisance estimation, and standard identifiability and regularity conditions, maximizing the sample weighted criterion estimates the corresponding target-model parameter. If the hazard model is misspecified, weighting does not make it correct; it instead targets the best-fitting model under the weighted population criterion. \(\square\)
Weighted Risk-Set Hazards and Survival Predictions
A useful special case has a separate hazard for each interval and treatment group, with no additional predictors. The weighted likelihood gives a transparent estimate: within a treatment-by-interval risk set, add the weights for observed events and divide by the weights for all observed people at risk.
To derive it, write the weighted log-likelihood for that cell as \(D\log h+(R-D)\log(1-h)\), where \(D\) is the sum of weights on event rows and \(R\) is the sum of weights on all observed at-risk rows. If \(0<D<R\), differentiating gives \(D/h-(R-D)/(1-h)\); setting this to zero yields \(D(1-h)=h(R-D)\), hence \(D=hR\) and \(\hat h=D/R\). If \(D=0\), the likelihood is maximized at \(h=0\); if \(D=R\), it is maximized at \(h=1\). Thus \(\hat h=D/R\) for all \(R>0\). The result is a weighted analogue of the event fraction in the risk set.
Once hazards are fitted, the treatment-specific marginal survival prediction through interval \(k\) is the product of the probabilities of surviving each interval:
This follows from the chain rule: survival through \(k\) requires surviving interval 1, then interval 2 conditional on surviving interval 1, and so on. The corresponding hazards must therefore describe the target marginal risk sets for the stated treatment group. If a hazard model includes covariates and predicts conditional hazards, simply multiplying those hazards for a selected covariate value gives a conditional survival prediction, not automatically a marginal one. A marginal prediction then requires averaging survival predictions over the target covariate distribution.
Worked Example: A Weighted Hazard in One Risk Set
At one interval, four observed people in the same treatment group are event-free at the start. Their censoring weights are \(1,3,2,1\), and their event indicators are \(1,0,1,0\). Find the weighted hazard and compare it with the unweighted event fraction.
The weighted event total is \(1(1)+3(0)+2(1)+1(0)=3\). The total risk-set weight is \(1+3+2+1=7\). Thus
The unweighted event fraction is \(2/4=0.5\). The difference occurs because the two event rows together carry weight \(1+2=3\), while the nonevent rows carry weight \(3+1=4\). The weighted estimate is not obtained by averaging individual weights or by weighting only the event rows; the denominator represents the entire observed risk set.
Worked Example: From Logistic Hazards to Survival
Suppose a fitted pooled logistic model is \(\operatorname{logit}\{h_t(A)\}=\alpha_t+0.5A\), with \(\alpha_1=-2\) and \(\alpha_2=-1.5\). Calculate the two hazards and survival through interval 2 for each treatment group.
For \(A=0\), the hazards are \(\operatorname{expit}(-2)=0.1192\) and \(\operatorname{expit}(-1.5)=0.1824\), to four decimal places. Therefore
For \(A=1\), the linear predictors are \(-1.5\) and \(-1\), giving hazards \(0.1824\) and \(0.2689\). Hence
The fitted survival probability is lower for \(A=1\) in this example because its modeled hazard is higher in both intervals. These are marginal treatment-specific predictions only if the fitted hazards represent the intended marginal risk sets; IPCW for censoring does not by itself remove treatment confounding.
Worked Example: One Person's Weighted Log-Likelihood Contribution
A person has three observed event-free person-period rows, with fitted hazards \(0.10,0.15,0.80\), outcomes \(0,0,1\), and censoring weights \(1.25,1/0.60,1/0.36\). Calculate the person's contribution to \(\ell_w\).
For a nonevent row, the Bernoulli log-likelihood term is \(\log(1-h)\); for an event row it is \(\log(h)\). Therefore the weighted contribution is
The three terms, calculated using the exact logarithms, are approximately \(1.25\log(0.90)=-0.1317006\), \((1/0.60)\log(0.85)=-0.2708649\), and \((1/0.36)\log(0.20)=-4.4706609\). Their sum is approximately \(-4.8732264\), which rounds to \(-4.8732\). The final event row contributes only to interval 3; a person who experiences the event does not enter later risk sets.
Diagnostics, Alternatives, and Limits
A weighted fit should be checked as a combined censoring-and-event modeling procedure. Useful diagnostics include examining the distribution of \(W_{it}\) overall and by interval, treatment, and important history; checking how many weighted people remain in each risk set; and comparing fitted event hazards with weighted observed event fractions. Large weights, sparse late risk sets, or sharp changes in estimates after a few high-weight rows are warnings that positivity may be weak or the censoring model unstable. Also check whether the event model captures the time pattern: a single common hazard is generally inappropriate when hazards vary over intervals.
A weighted Kaplan-Meier estimator is a nonparametric alternative that estimates survival from weighted risk sets without imposing a regression form for the interval hazards. A weighted discrete-time regression can be more convenient for covariate or treatment contrasts and can smooth or parameterize the time pattern, but that convenience comes with event-model assumptions. Complete-case analysis instead discards people lost to follow-up and generally targets the wrong survival distribution when censoring depends on event-related history. Neither weighting nor regression eliminates bias if relevant predictors of censoring are unmeasured, censoring probabilities are misspecified, or positivity fails.
Weights are estimates, not known constants. Treating them as fixed can understate uncertainty; inference should account for their estimation using an appropriate method. Also, the fitted weighted pseudo-likelihood should not be interpreted as an ordinary likelihood for the observed sample. Stabilization can reduce variability, but it changes the weighted estimating criterion according to its numerator; it is not a remedy for zero observation probability.
- Wrong: “Every observed row gets weight \(1/G_{iK}\), the inverse probability of remaining observed through the end of follow-up.”
Correction: The contribution for interval \(t\) is ordinarily weighted by the inverse probability of being observed through the ascertainment needed for that interval, \(1/G_{it}\). Using a final-follow-up weight for every earlier row changes the estimating criterion and can misrepresent how each row was selected. - Wrong: “A weighted regression of the event indicator directly estimates survival.”
Correction: The person-period regression estimates interval hazards among those event-free at each interval. Survival is obtained by multiplying the complements of the hazards through the desired time. - Wrong: “A censoring-weighted treatment contrast is automatically causal.”
Correction: Censoring weights address informative loss to follow-up under their assumptions. Causal treatment contrasts also require appropriate control of treatment confounding and a clearly defined target intervention.
Check Your Understanding
Answer each question, then check the brief solutions.
- In a two-interval study, why does a person who has an observed event in interval 1 contribute no interval-2 row?
- At one interval, the event-row weights sum to 4 and all observed at-risk weights sum to 10. What is the saturated weighted hazard?
- If the fitted hazards in two intervals are \(0.20\) and \(0.30\), what is fitted survival through interval 2?
- Name two assumptions needed for the censoring-weight identity to recover full-data contributions.
- Does censoring IPCW alone justify a causal treatment interpretation? Explain briefly.
Solutions. 1. The person is no longer event-free, so they are not at risk in interval 2. 2. The estimate is \(4/10=0.40\). 3. Survival is \((1-0.20)(1-0.30)=0.80(0.70)=0.56\). 4. Sequential independent censoring given measured history and censoring positivity are two essential assumptions; consistent estimation of censoring probabilities is also needed for the practical procedure. 5. No. IPCW addresses selection from censoring, not treatment confounding; additional assumptions and methods are needed for a causal treatment contrast.