Signature
l_i = delta_i * (log(k / b) + (k - 1) * log(X_i / b)) - (X_i / b)^k + (L_i / b)^k
| Inputs | Definition | Unit |
|---|---|---|
delta_i | 1 if the record ends in an event, 0 if censored | indicator |
k | Shape parameter; above 1 the hazard rises with time, below 1 it falls | none |
b | Scale parameter, the time by which about 63 per cent have had the event | months |
X_i | Time from the origin to the event or censoring | months |
L_i | Time from the origin to entry, 0 if observed from the origin | months |
l_i | Contribution of record i to the log-likelihood | log-likelihood |
|---|
Function
Survival estimation from left-truncated records with entry-restricted risk sets
Maps records with an entry time, an exit time and an event indicator to survival from the time origin when people come under observation only after the origin. Each person informs survival only beyond entry, conditional on surviving to entry, so risk sets and likelihood contributions start at entry. The notation follows the Left Truncation article and its six registry patients.
Try this function
Implementations
Excel
Weibull contribution of a left-truncated record from named cells
With EventFlag, Shape, Scale, ExitTime and EntryTime named, the formula returns the log-likelihood contribution, held in LogLikI; summing it over records and maximising with Solver over Shape and Scale fits the curve.
=EventFlag*(LN(Shape/Scale)+(Shape-1)*LN(ExitTime/Scale))-(ExitTime/Scale)^Shape+(EntryTime/Scale)^Shape
Assumptions
Weibull form for the survival curve from the origin
Survival from the origin follows S(t) = exp(minus (t / b)^k) with the shape and scale shared by everyone in the group; other distributions change the density and survival terms but keep the entry term minus log S(L_i).
Independent entry and one record per person
Entry is independent of the event time given that the event follows entry; a person with a gap in observation contributes one such term per observed interval.
Worked examples
Patient F entering at 20 months and dying at 33 months
With shape 1.2 and scale 30 months, the contribution is about minus 3.7062 (computed here for illustration).
delta_i = 1; k = 1.2; b = 30; X_i = 33; L_i = 20; l_i = -3.7062
Patient F with the entry term left out
Setting the entry time to 0 drops (20 / 30)^1.2, about 0.6147, and gives about minus 4.3210, the contribution of a patient observed from diagnosis (computed here for illustration).
delta_i = 1; k = 1.2; b = 30; X_i = 33; L_i = 0; l_i = -4.321
Patient E entering at 12 months and censored at 36 months
A censored record contributes log survival to 36 months minus log survival to 12 months, about minus 0.9115 (computed here for illustration).
delta_i = 0; k = 1.2; b = 30; X_i = 36; L_i = 12; l_i = -0.9115
Common errors
Leaving the entry term out of a parametric fit
Patient F's contribution falls from about minus 3.71 to minus 4.32 when the 20 months before entry are treated as observed survival; across a registry such terms pull the fitted curve towards long survival.
Resetting the clock to entry for a model that starts at diagnosis
Fitting from entry removes the pre-entry time but estimates survival after registration, not after diagnosis, so the curve no longer matches a model cohort that starts at diagnosis.
Sources
Density and survival conditional on entry in parametric survival likelihoods
StataCorp. Stata Survival Analysis Reference Manual, Release 19. College Station, TX: Stata Press; 2025. Entry streg, Methods and formulas: a subject known to fail at time t contributes f(t)/S(t0), the density at t conditional on the entry time t0, and a censored observation contributes S(t)/S(t0). The log of these, with the Weibull density and survival, gives the contribution in this record.
Left-truncated parametric fits from counting-type records in R
Jackson C. flexsurv: Flexible parametric survival and multi-state models. R package version 2.3. Help page flexsurvreg. Argument formula: Surv objects of type counting are supported and correspond to left-truncated observations, so a Weibull fit with entry and exit times uses the conditional likelihood.
Canonical Identity
Stable URI · Machine-readable · Resolvable · CC BY 4.0