Skip to main content
HHS Author Manuscripts logoLink to HHS Author Manuscripts
. Author manuscript; available in PMC: 2017 Aug 23.
Published in final edited form as: Am Stat. 2012 Jan 1;55(3):207–210. doi: 10.1198/000313001317098185

The Kaplan-Meier Estimator as an Inverse-Probability-of-Censoring Weighted Average

Glen A Satten 1, Somnath Datta 2
PMCID: PMC5568678  NIHMSID: NIHMS810169  PMID: 28845048

Abstract

The Kaplan-Meier (product-limit) estimator of the survival function of randomly-censored time-to-event data is a central quantity in survival analysis. It is usually introduced as a nonparametric maximum likelihood estimator, or else as the output of an imputation scheme for censored observations such as redistribute-to-the-right or self-consistency. Following recent work by Robins and Rotnitzky, we show that the Kaplan-Meier estimator can also be represented as a weighted average of identically distributed terms, where the weights are related to the survival function of censoring times. We give two demonstrations of this representation; the first assumes a Kaplan-Meier form for the censoring time survival function, the second estimates the survival functions of failure and censoring times simultaneously and can be developed without prior introduction to the Kaplan-Meier estimator.

1. Introduction

The Kaplan-Meier (product-limit) estimator for the survival function of randomly-censored time-to-event data (Kaplan and Meier, 1958) is often introduced as the maximizer of a nonparametric maximum likelihood (Kalbfleisch and Prentice, 1978). Because data are subject to censoring, estimating the survival function can be thought of as a missing data problem. There are two general approaches to missing data problems: imputation, and weighting. Alternate presentations of the Kaplan-Meier estimator, including the redistribution-to-the-right algorithm of Efron (1967), the self-consistency property (Efron, 1967), or the E-M algorithm approach (Turnbull, 1976) are all examples of the imputation approach. In a series of papers, Robins and coworkers have shown that the weighting approach to missing data problems has a number of advantages over the imputation approach (Robins and Rotnitzky, 1992; Robins 1993; and Robins and Finkelstein 2000 relate directly to survival analysis). An outcome of their approach applied to survival analysis is an inverse-probability-of-censoring representation of the Kaplan-Meier estimator. The purpose of this paper is to provide a straightforward demonstration of this representation. We give two simple demonstrations of this representation. The first, found in Section 3, is more straightforward but uses as weights the Kaplan-Meier estimator for censoring times, and hence does not stand alone. For this reason, we give a second approach in Section 4 that simultaneously estimates the cumulative distribution functions of survival and censoring times using coupled inverse-probability-weighted sums. The weighted average form given in this paper is convenient for asymptotic theory and it leads to an interesting variance decomposition for the Kaplan-Meier estimator (not shown here; see Satten et al. 2001 or Robins and Finkelstein 2000 for examples of this type of result).

2. Notation and Preliminary Results

For i = 1, …, N let Ti be the random variable denoting the (possibly unobserved) failure time and Ci be the random variable denoting the (possibly unobserved) censoring time for the ith person. We adopt the usual convention that realizations of random variables are denoted by lower-case letters. Let Ti = min( Ti,Ci) and let Δi = I[ TiCi.]. The observed data consist of i.i.d. replicates of (Ti, Δi). We assume “random censoring,” i.e. that Ti and Ci are independent. The goal is to estimate the survival function S(t) = Pr[ Ti>t] or, equivalently, the cumulative distribution function F(t) = 1−S(t).

Let the ordered failure or censoring times be τj, j = 1, …, J and let nj be the number of persons who fail at time τj and mj be the number of persons censored at time τj. We assume that no person can have a failure time equal to their censoring time (i.e. such persons are taken to be uncensored with failure time τj). Then, the risk set (number of persons at risk for failure at time t) can be written as

Y(t)=j=1J(nj+mj)I[τjt]. (1)

The Kaplan-Meier estimator is S^km(t) of S(t) is

S^km(t)={j|τjt}(1njY(τj)) (2)

We can also estimate the survival function for censoring times, K(t) = Pr[Ci>t] using the Kaplan-Meier approach but considering failure events as “censored” observations and censored observations as “failures.” The Kaplan-Meier estimator of K(t) is thus

K^(t)={j|τjt}(1mjY(τj)). (3)

If there were no censoring, we could estimate F(t) by the empirical cumulative distribution function

F(t)=1Ni=1NI[tit], (4)

which, considered as a random variable for each t, is an average of iid terms. The inverse-probability-of-censoring estimator analogous to F*(t) is also an average of iid terms I[tit], each multiplied by δi=[tici] and weighted inversely by the probability that the failure time is observed, i.e. by Pr[Citi]K(ti). Of course we do not know K(t) so we must use an estimate; we use the Kaplan-Meier estimator of K(t) given in (3). Because this estimator was first proposed by Robins and Rotnitzky (1992) we denote the resulting estimator by F^rr(t); it is given by

F^rr(t)=1Ni=1NI[tit]δiK^(ti). (5)

Note that we have used I[ti≤ t] rather than I[tit] in (4) to emphasize that F^rr(t) can be calculated using the observed data; this replacement is possible as I[tit]δi=I[tit]δi.

3. Equivalence of F^rr(t) and F^km(t)

Note that both F^rr(t) and F^km(t):=1S^km(t) are right-continuous step functions with possible jumps at times τj. Thus, F^rr and F^km are the same if the magnitudes of the jumps in the two functions are equal. The jump in F^km at time τj is given by

S^km(τj)S^km(τj)=S^km(τj)njY(τj) (6)

while the jump in F^rr(τj) is given by

F^rr(τj)F^rr(τj)=1NnjK^(τj)

The jumps are equal provided

1N1K^(τj)=S^km(τj)Y(τj)

or

S^km(τj)K^(τj)=1NY(τj). (7)

As long as there is no time τj for which njmj > 0 (i.e., no ties between deaths and censored values), then

S^km(τj)K^(τj)=j<j(1njY(τj))j<j(1mjY(τj))=j<j(1nj+mjY(τj));

but

j<j(1nj+mjY(τj))=(1n1+m1n1+m1++nJ+mJ)(1n2+m2n2+m2++nJ+mJ)(1nj1+mj1nj1+mj1++nJ+mJ)=(n2+m2++nJ+mJn1+m1++nJ+mJ)(n3+m3++nJ+mJn2+m2++nJ+mJ)(nj+mj++nJ+mJnj1+mj1++nJ+mJ)=(nj+mj++nJ+mJn1+m1++nJ+mJ)=Y(τj)N

since n1+m1 ⋯+nJ+mJ = N, so that equation (7) holds.

For the case where njmj>0 for some j, the argument above breaks down because

(1njY(τj))(1mjY(τj))(1nj+mjY(τj))

We can ask, what function K′(t) of the form K(t)={j|τjt}(1dj) would make F^rr(t) equal to F^km(t) even in the presence of ties. The appropriate choice of dj solves

(1njY(τj))(1dj)=(1nj+mjY(τj))

for each j, from which we obtain dj = mj/{Y(τj)−nj}and hence

K(t)={j|τjt}(1mjY(τj)nj).

Note that K′ is the Kaplan-Meier estimator of censoring times we would obtain if we broke the ties between failures and censored observations by assuming that the failures had occurred just before the censored observations. This coincides with the usual convention when calculating the Kaplan-Meier estimator of failure times with data where there are ties between failure and censoring times (Kaplan and Meier 1958, p. 461).

4. Coupled Estimation of the Distribution of Failure and Censoring Times

The results in Section 3 are somewhat unsatisfactory in that the definition of F^rr(τj) uses a Kaplan-Meier estimator (for the censoring times, K^). Hence, these results would be unsuitable for an a priori development of the Kaplan-Meier estimator. In this section, we introduce a “new” inverse-probability-of-censoring weighted estimator of F(t) that makes no reference to the Kaplan-Meier estimator of the censoring times. We then show that this “new” estimator is identical to the Kaplan-Meier estimator. Our approach is to simultaneously estimate F(t)=Pr[Tit] and G(t)=1K(t)=Pr[Cit] using coupled inverse-probability-of-censoring weighted estimators. Let F^(t) and G^(t) be given by

F^(t)=1ni=1nI[tit]δi1G^(ti)

and

G^(t)=1ni=1nI[tit]δ¯i1F^(ti)

where δ¯i=I[ci<ti]. Then F^(t) is a step function with jumps at times τj for which nj > 0 and G^(t) is a step function with jumps at times τj for which mj.> 0. The asymmetry in definitions of F^(t) and G^(t) reflects the choice that when failure and censoring times are tied, the censored observations are considered to have been lost to follow-up after the failures had occurred. Denoting the jumps in F^(τj) and G^(τj) by fj and gj we have

fj=1Nnj(1j<jgj) (8)

and

gj=1Nmj(1jjfj), (9)

where the sum j<jgj is to be interpreted as 0. Note that these equations are easily uncoupled to yield

fj=njNj<jmj(1jjfj) (10)

and

gj=mjNjjnj(1j<jgj). (11)

Equations (10)(11) for the fj and gj are triangular, i.e. the right hand side of the equation (10) expresses fj in terms of fj,j<j. Hence, the fj and hence F^(t) can be calculated recursively using (10). Similarly, G^(t) can be calculated using (11), if desired.

Although it is not immediately obvious, the fact is that F^(t)=F^km(t). To see this recall that the masses in the Kaplan-Meier estimator is the maximizer of the likelihood

L=j=1Jfjnj(j>jfj)mj (11)

subject to j=1J+1fj=1. Following Turnbull (1976), note that {fj,1jJ+1} solves this maximization problem if

Dj:=lnLfjj=1J+1fjlnLfj=0

and j=1J+1fj=1. Some algebra shows that the condition Dj = 0 can be rewritten as

njfj+j<jmj(j<jfj)N=0; (12)

solving (12) for fj yields Equation (10), establishing the equivalence of F^(t) and F^km(t)

Discussion

The Kaplan-Meier estimator is a fundamental tool in survival analysis. It is usually introduced as a nonparametric maximum likelihood estimator. The likelihood-based approach is useful, leading to useful generalizations when data are subject to interval censoring (Turnbull, 1976), truncation (Woodroofe 1985, Wang, Jewell and Tsai 1986) or both (Frydman 1994). We have shown that the Kaplan-Meier estimator can also be expressed as an inverse-probability-of-censoring weighted estimator.

The weighted average form given in this paper with the true K is an average of i.i.d. terms under the random censoring model. Even under the model when censoring times are regarded fixed (Meier, 1975), it is an average of independent (but not necessarily identically distributed) terms and is therefore subject to appropriate laws of large numbers and central limit theorems. Thus, the inverse-probability-of-censoring weighted estimator is also convenient for asymptotic theory.

Since the inverse-probability-of-censoring approach in survival analysis was introduced by Robins and Rotnitzky (1992) it has also led to useful generalizations, primarily to more general censoring models where the censoring hazard may depend on an observable covariate history (see e.g. Robins and Finkelstein, 2000, Satten and Datta 2002 and Satten et al., 2001, for recent discussions). We have given two demonstrations of the equivalence of the inverse-probability-of censoring weighted sum and product-limit representations of the Kaplan-Meier estimator. The first, given in Section 3, is designed to achieve the result quickly, but requires the availability of the Kaplan-Meier estimator of censoring times. The second, given in Section 4, is less direct, but constructs the weighted estimator without making any reference to the Kaplan-Meier estimator.

Contributor Information

Glen A. Satten, Division of HIV/AIDS Prevention - Surveillance and Epidemiology, National Center for HIV, STD and TB Prevention, Centers for Disease Control and Prevention, Atlanta, GA 30333 USA

Somnath Datta, Department of Statistics, University of Georgia, Athens, GA 30602 USA.

References

  1. Efron B. Proceedings 5th Berkeley Symposium on Mathematical Statistics and Probability. IV. University of California Press; Berkeley, CA: 1967. The two sample problem with censored data; pp. 831–853. [Google Scholar]
  2. Frydman H. A note on nonparametric estimation of the distribution function from interval-censored and truncated observations. Journal of the Royal Statistical Society, Series B. 1994;56:71–74. [Google Scholar]
  3. Kaplan EL, Meier P. Nonparametric estimation from incomplete observations. Journal of the American Statistical Association. 1958;53:457–481. [Google Scholar]
  4. Kalbfleisch J, Prentice R. The Statistical Analysis of Failure Time Data. New York: John Wiley; 1980. [Google Scholar]
  5. Meier P. Perspectives in Probability and Statistics. Ed J. Gani, Sheffeld Eng.: Applied Probability Trust; 1975. Estimation of a distribution function from incomplete observations. [Google Scholar]
  6. Miller RG., Jr . Survival Analysis. New York: John Wiley & Sons; 1981. [Google Scholar]
  7. Robins JM. Information recovery and bias adjustment in proportional hazards regression analysis of randomized trials using surrogate markers. Proceedings of the American Statistical Association - Biopharmaceutical Section. 1993:24–33. [Google Scholar]
  8. Robins J, Finkelstein D. Correcting for non-compliance and dependent censoring in an AIDS clinical trial with inverse probability of censoring weighted (IPCW) log-rank tests. Biometrics. 2000;56:779–788. doi: 10.1111/j.0006-341x.2000.00779.x. [DOI] [PubMed] [Google Scholar]
  9. Robins JM, Rotnitzky A. Recovery of information and adjustment for dependent censoring using surrogate markers. In: Jewell N, Dietz K, Farewell V, editors. AIDS Epidemiology – Methodological Issues. Boston: Birkhauser; 1992. pp. 297–331. [Google Scholar]
  10. Satten GA, Datta S. Marginal Estimation for Multistage Models: Waiting Time Distributions and Competing Risks Analyses. Statistics in Medicine. 2002;21:3–19. [PubMed] [Google Scholar]
  11. Satten GA, Datta S, Robins JM. Estimating the Marginal Survival Function in the Presence of Time Dependent Covariates. Statistics and Probability Letters. 2001;54:397–403. [Google Scholar]
  12. Turnbull The empirical distribution function with arbitrarily grouped, censored and truncated data. Journal of the Royal Statistical Society, Series B. 1976;38:290–295. [Google Scholar]
  13. Wang M-C, Jewell N, Tsai W-Y. Asymptotic properties of the product limit estimator under random truncation. The Annals of Statistics. 1986;124:1597–1605. [Google Scholar]
  14. Woodroofe M. Estimating a distribution function with truncated data. The Annals of Statistics. 1985;13:163–177. Correction, 15, 883 (1987) [Google Scholar]

RESOURCES