This summarizes the situation with a single event possible per individual and independence between censoring/truncation and event times and also independence among individuals. Klein and Moeschberger, on page 74 of their comprehensive "Survival Analysis: Techniques for Censored and Truncated Data" (Springer; 2nd edition, 2003), clearly explain the types of information available from such data:
An observation corresponding to an exact event time provides information on the probability that the event’s occurring at this time ... For a right-censored observation all we know is that the event time is larger than this time, so the information is the survival function evaluated at the on study time. Similarly for a left-censored observation, all we know is that the event has already occurred, so the contribution to the likelihood is the cumulative distribution function evaluated at the on study time. Finally, for interval-censored data we know only that the event occurred within the interval, so the information is the probability that the event time is in this interval. For truncated data these probabilities are replaced by the appropriate conditional probabilities.
They then show how to express likelihoods for each of these types of data in terms of the probability distribution of individual-associated event times $f_i(t)$ and the corresponding survival function $S_i(t)=1-\int_0^t f_i(\tau) d\tau$, evaluated at the event, censoring, or truncation times. See this page for details.
If you have a fully parametric form of the survival function (including relationships between individual covariate values and survival), you can thus find the parameter values that maximize the likelihood of the data for combinations of all these types of censoring and truncation. That way you can in principle fit any fully parametric survival model, including parametric accelerated failure time (AFT) models, although I'm not sure that any single software package handles all censoring/truncation patterns. The basic survreg()
function in the R survival
package can fit several AFT models, including with interval-censored data. The CRAN survival task view describes many other packages designed for specific situations. The flexurv
package in particular lets you specify your own parametric form.
You need to be able to let the software know the specific type of each observation. In R, that's generally done with the a Surv()
function that can specify time
, time2
(for interval data), the event
indicator, and the censoring type
. With a single kind of event, the censoring type
is "right", "left", "counting", or a form of "interval". The "counting" type
can represent left truncation at time
and right censoring or an event at time2
. Right censoring (possibly with left truncation) is most commonly used, in my experience with clinical survival data. In many circumstances (for example, cancer recurrence that develops between scheduled follow-up visits), interval censoring would be more appropriate than the (perhaps unconscious) use of the detection-visit time as the event time.
Interval censoring highlights a major difference between parametric and semi-parametric (e.g., Cox) or non-parametric analysis: "the information is the probability that the event time is in this interval" (see quote above). Without a pre-defined parameterization of $S_i(t)$ specifying the forms of probabilities at both ends of the interval, you need a specialized approach. The R coxph()
function thus can't analyze interval-censored data properly; for a Cox model you need the special handling provided, for example, by the R icenReg
package. Even that package, however, can't fit a semi-parametric AFT model to interval-censored data.
For semi- and non-parametric analysis, reversing the time scale can simplify analysis. For left-censored data, "Instead of measuring time from the origin we fix a large time $\tau$ and define new times by $\tau$ minus the original times. The data set based on these reverse times is now right-censored" (Klein and Moeschberger, pages 140-141).* Continuing on page 149: "For right-truncated data, only individuals for which the event has occurred by a given date are included in the study... Estimation for this type of data proceeds by reversing the time axis," thus converting right truncation to left truncation. The coxrt
package provides methods for analyzing right truncated survival data, with a vignette describing assumptions and issues like bias that can arise.
For further study, a 1997 review by Leung et al in the Annual Review of Public Health provides an accessible introduction to these issues in survival analysis, with an emphasis on censoring. It might make sense to start with that before diving into Klein and Moeschberger. When you do dive into that text, data sets used as illustrative examples of censoring and truncation are in the R KMsurv
package.
*Note, however, that "Examples of pure left censoring are rare" (Klein and Moeschberger, page 141), and this warning from the author of icenReg about difficulties in regression modeling with left censoring.