guide:25359c324b: Difference between revisions
No edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
==Kaplan–Meier estimator== | |||
The '''Kaplan–Meier estimator''',<ref>{{cite journal |last1=Kaplan |first1=E. L. |last2=Meier |first2=P. |title=Nonparametric estimation from incomplete observations |journal=[[wikipedia:Journal of the American Statistical Association|J. Amer. Statist. Assoc.]] |volume=53 |issue=282 |pages=457–481 |year=1958 |jstor=2281868 |doi=10.2307/2281868}}</ref><ref>Kaplan, E.L. in a retrospective on the seminal paper in "This week's citation classic". ''Current Contents'' '''24''', 14 (1983). [http://www.garfield.library.upenn.edu/classics1983/A1983QS51100001.pdf Available from UPenn as PDF.]</ref> also known as the '''product limit estimator''', is a [[wikipedia:non-parametric statistics|non-parametric]] [[wikipedia:statistic|statistic]] used to estimate the [[wikipedia:survival function|survival function]] from lifetime data. | |||
The [[wikipedia:estimator|estimator]] of the [[wikipedia:survival function|survival function]] <math>S(t)</math> (the probability that life is longer than <math>t</math>) is given by: | |||
<math display = "block"> \widehat S(t) = \prod\limits_{i:\ t_i\le t} \left(1 - \frac{d_i}{n_i}\right),</math> | |||
with <math>t_i</math> a time when at least one event happened, <math>d_i</math> the ''number of events'' (e.g., deaths) that happened at time <math>t_i</math>, and <math> n_i</math> the ''individuals known to have survived'' (have not yet had an event or been censored) up to time <math>t_i</math>. | |||
===Basic concepts=== | |||
A plot of the Kaplan–Meier estimator is a series of declining horizontal steps which, with a large enough sample size, approaches the true survival function for that population. The value of the survival function between successive distinct sampled observations ("clicks") is assumed to be constant. | |||
An important advantage of the Kaplan–Meier curve is that the method can take into account some types of [[wikipedia:Censoring (statistics)|censored data]], particularly ''right-censoring'', which occurs if a patient withdraws from a study, is lost to follow-up, or is alive without event occurrence at last follow-up. On the plot, small vertical tick-marks state individual patients whose survival times have been right-censored. When no truncation or censoring occurs, the Kaplan–Meier curve is the [[wikipedia:Complementary event|complement]] of the [[wikipedia:empirical distribution function|empirical distribution function]]. | |||
In [[wikipedia:medical statistics|medical statistics]], a typical application might involve grouping patients into categories, for instance, those with Gene A profile and those with Gene B profile. In the graph, patients with Gene B die much quicker than those with Gene A. After two years, about 80% of the Gene A patients survive, but less than half of patients with Gene B. | |||
To generate a Kaplan–Meier estimator, at least two pieces of data are required for each patient (or each subject): the status at last observation (event occurrence or right-censored), and the time to event (or time to censoring). If the survival functions between two or more groups are to be compared, then a third piece of data is required: the group assignment of each subject.<ref name="km-explain">{{cite journal |last1=Rich |first1=Jason T. |last2=Neely |first2=J. Gail |last3=Paniello |first3=Randal C. |last4=Voelker |first4=Courtney C. J. |last5=Nussenbaum |first5=Brian |last6=Wang |first6=Eric W. |title=A practical guide to understanding Kaplan-Meier curves |journal=Otolaryngology–Head and Neck Surgery |date=September 2010 |volume=143 |issue=3 |pages=331–336 |doi=10.1016/j.otohns.2010.05.007 |pmid=20723767 |pmc=3932959 }}</ref> | |||
=== Problem definition === | |||
Let <math>\tau\ge 0</math> be a random variable, which we think of as the time that elapses between the start of the possible exposure period, <math>t_0</math>, and the time that an event of interest takes place, <math>t_1</math>. As indicated above, the goal is to estimate the [[wikipedia:survival function|survival function]] <math>S</math> underlying <math>\tau</math>. Recall that this function is defined as | |||
<math display = "block">S(t) = \operatorname{Prob}(\tau > t )</math>, where <math>t=0,1,\dots</math> is the time. | |||
Let <math>\tau_1,\dots,\tau_n\ge 0</math> be independent, identically distributed random variables, whose common distribution is that of <math>\tau:\tau_j</math> is the random time when some event <math>j</math> happened. The data available for estimating <math>S</math> is not <math>(\tau_j)_{j=1,\dots,n}</math>, but the list of pairs <math>(\, ( \tilde \tau_j, c_j )\, )_{j=1,\dots,n}</math> where for <math>j\in [n] := \{1,2,\dots,n\}</math>, <math>c_j\ge 0</math> is a fixed, deterministic integer, the '''censoring time''' of event <math>j</math> and <math>\tilde \tau_j = \min(\tau_j,c_j)</math>. In particular, the information available about the timing of event <math>j</math> is whether the event happened before the fixed time <math>c_j</math> and if so, then the actual time of the event is also available. The challenge is to estimate <math>S(t)</math> given this data. | |||
=== Derivation of the Kaplan–Meier estimator === | |||
Here, we show two derivations of the Kaplan–Meier estimator. Both are based on rewriting the survival function in terms of what is sometimes called '''hazard''', or '''mortality rates'''. However, before doing this it is worthwhile to consider a naive estimator. | |||
==== A naive estimator ==== | |||
To understand the power of the Kaplan–Meier estimator, it is worthwhile to first describe a naive estimator of the survival function. | |||
Fix <math>k\in [n]:=\{1,\dots,n\}</math> and let <math>t>0</math>. A basic argument shows that the following proposition holds: | |||
{{Propcard||prop.kme|If the censoring time <math>c_k</math> of event <math>k</math> exceeds <math>t</math> (<math>c_k\ge t</math>), then <math>\tilde \tau_k\ge t</math> if and only if <math>\tau_k\ge t</math>.|Let <math>k</math> be such that <math>c_k\ge t</math>. It follows from the above proposition that | |||
<math display = "block">\operatorname{Prob}(\tau_k\ge t) = \operatorname{Prob}(\tilde \tau_k\ge t).</math> | |||
Let <math> | |||
X_k = \mathbb{I}(\tilde \tau_k\ge t) | |||
</math> and consider only those <math> | |||
k\in C(t) := \{ 1\le k \le n \,:\, c_k \ge t\} | |||
</math>, i.e. the events for which the outcome was not censored before time <math>t</math>. Let <math> | |||
m(t)=|C(t)| | |||
</math> be the number of elements in <math> | |||
C(t) | |||
</math>. Note that the set <math> | |||
C(t) | |||
</math> is not random and so neither is <math> | |||
m(t) | |||
</math>. Furthermore, <math> | |||
(X_k)_{k\in C(t)} | |||
</math> is a sequence of independent, identically distributed [[wikipedia:Bernoulli random variable|Bernoulli random variable]]s with common parameter <math> | |||
S(t)=\operatorname{Prob}(\tau\ge t) | |||
</math>. Assuming that <math> | |||
m(t)>0 | |||
</math>, this suggests to estimate <math>S(t)</math> using | |||
<math display = "block"> | |||
\hat S_\text{naive}(t) | |||
= \frac{1}{m(t)} \sum_{k:c_k\ge t} X_k | |||
= \frac{|\{1\le k \le n\,:\, \tilde \tau_k\ge t\}|}{|\{1\le k \le n\,:\, c_k\ge t\}|} | |||
= \frac{|\{1\le k \le n\,:\, \tilde \tau_k\ge t\}|}{m(t)}, | |||
</math> | |||
where the second equality follows because <math> \tilde \tau_k\ge t </math> implies <math> c_k\ge t </math>, while the last equality is simply a change of notation. | |||
}} | |||
The quality of this estimate is governed by the size of <math>m(t)</math>. This can be problematic when <math>m(t)</math> is small, which happens, by definition, when a lot of the events are censored. A particularly unpleasant property of this estimator, that suggests that perhaps it is not the "best" estimator, is that it ignores all the observations whose censoring time precedes <math>t</math>. Intuitively, these observations still contain information about <math>S(t)</math>: For example, when for many events with <math>c_k < t </math>, <math>\tilde \tau_k < c_k </math> also holds, we can infer that events often happen early, which implies that <math>\operatorname{Prob}(\tau\le t)</math> is large, which, through <math>S(t) = 1-\operatorname{Prob}(\tau\le t)</math> means that <math>S(t)</math> must be small. However, this information is ignored by this naive estimator. The question is then whether there exists an estimator that makes a better use of all the data. This is what the Kaplan–Meier estimator accomplishes. Note that the naive estimator cannot be improved when censoring does not take place; so whether an improvement is possible critically hinges upon whether censoring is in place. | |||
==== The plug-in approach ==== | |||
By elementary calculations, | |||
<math display = "block"> \begin{align} | |||
S(t) & = \operatorname{Prob}(\tau > t\mid\tau > t-1)\operatorname{Prob}(\tau > t-1) \\[4pt] | |||
& = (1-\operatorname{Prob}(\tau\le t\mid\tau > t-1)) \operatorname{Prob}(\tau > t-1)\\[4pt] | |||
& = (1-\operatorname{Prob}(\tau=t\mid\tau \ge t)) \operatorname{Prob}(\tau > t-1) \\[4pt] | |||
& = q(t) S(t-1)\,, | |||
\end{align} | |||
</math> | |||
where the second to last equality used that <math>\tau</math> is integer valued and for the last line we introduced | |||
<math display = "block">q(t) = 1-\operatorname{Prob}(\tau=t\mid\tau\ge t).</math> | |||
By a recursive expansion of the equality <math>S(t) = q(t) S(t-1)</math>, we get | |||
<math display = "block"> S(t) = q(t) q(t-1) \cdots q(0). </math> | |||
Note that here <math>q(0) = 1-\operatorname{Prob}(\tau=0\mid\tau > -1) = 1-\operatorname{Prob}(\tau=0)</math>. | |||
The Kaplan–Meier estimator can be seen as a "plug-in estimator" where each <math> q(s) | |||
</math> is estimated based on the data and the estimator of <math> S(t) | |||
</math> is obtained as a product of these estimates. | |||
It remains to specify how <math>q(s)=1-\operatorname{Prob}(\tau=s\mid\tau\ge s)</math> is to be estimated. By Proposition 1, for any <math>k\in [n]</math> such that <math>c_k\ge s</math>, <math>\operatorname{Prob}(\tau=s) = \operatorname{Prob}(\tilde \tau_k=s)</math> and <math>\operatorname{Prob}(\tau\ge s) = \operatorname{Prob}(\tilde \tau_k\ge s)</math> both hold. Hence, for any <math> | |||
k\in [n] </math> such that <math> c_k\ge s </math>, | |||
<math display = "block"> \operatorname{Prob}(\tau=s|\tau\ge s) = \operatorname{Prob}(\tilde \tau_k=s)/\operatorname{Prob}(\tilde \tau_k\ge s). </math> | |||
By a similar reasoning that lead to the construction of the naive estimator above, we arrive at the estimator | |||
<math display = "block">\hat q(s) | |||
= 1 - \frac{|\{1\le k\le n\,:\, c_k\ge s, \tilde \tau_k=s\}|}{|\{1\le k \le n\,:\, c_k\ge s, \tilde \tau_k\ge s\}|} | |||
= 1 - \frac{|\{1\le k\le n\,:\,\tilde \tau_k=s\}|}{|\{1\le k \le n\,:\, \tilde \tau_k\ge s\}|}</math> | |||
(think of estimating the numerator and denominator separately in the definition of the "hazard rate" <math>\operatorname{Prob}(\tau=s|\tau\ge s)</math>). The Kaplan–Meier estimator is then given by | |||
<math display = "block">\hat S(t) = \prod_{s=0}^t \hat q(s). </math> | |||
The form of the estimator stated at the beginning of the article can be obtained by some further algebra. For this, write <math>\hat q(s)=1-d(s)/n(s)</math> where, using the actuarial science terminology, <math>d(s)=|\{1\le k\le n\,:\,\tau_k=s\}|</math> is the number of known deaths at time <math>s</math>, while <math>n(s)=|\{1\le k \le n\,:\, \tilde \tau_k\ge s\}|</math> is the number of those persons who are alive (and not being censored) at time <math>s-1</math>. | |||
Note that if <math>d(s)=0</math>, <math>\hat q(s)=1</math>. This implies that we can leave out from the product defining <math>\hat S(t)</math> all those terms where <math>d(s)=0</math>. Then, letting <math>0\le t_1 < t_2<\dots < t_m</math> be the times <math>s</math> when <math>d(s)>0</math>, <math>d_i = d(t_i)</math> and <math>n_i = n(t_i)</math>, we arrive at the form of the Kaplan–Meier estimator given at the beginning of the article: | |||
<math display = "block">\hat S(t) = \prod_{i:t_i\le t} \left(1-\frac{d_i}{n_i}\right). </math> | |||
As opposed to the naive estimator, this estimator can be seen to use the available information more effectively: In the special case mentioned beforehand, when there are many early events recorded, the estimator will multiply many terms with a value below one and will thus take into account that the survival probability cannot be large. | |||
==== Derivation as a maximum likelihood estimator ==== | |||
Kaplan–Meier estimator can be derived from [[wikipedia:maximum likelihood estimation|maximum likelihood estimation]] of the discrete [[wikipedia:hazard function|hazard function]].<ref>{{Cite web|url=https://web.stanford.edu/~lutian/coursepdf/STAT331unit3.pdf|title=STAT331 Unit 3|accessdate=12 May 2023}}</ref>{{self-published inline|date=November 2021}} More specifically given <math>d_i</math> as the number of events and <math> n_i</math> the total individuals at risk at time <math> t_i</math>, discrete hazard rate <math> h_i</math> can be defined as the probability of an individual with an event at time <math> t_i</math>. Then survival rate can be defined as: | |||
<math display = "block"> S(t) = \prod\limits_{i:\ t_i\le t} (1-h_i)</math> | |||
and the likelihood function for the hazard function up to time <math> t_i</math> is: | |||
<math display = "block"> \mathcal{L}(h_{j: j\le i}\mid d_{j: j\le i},n_{j: j\le i}) = \prod_{j=1}^i h_j^{d_j}(1-h_j)^{n_j-d_j} {n_j \choose d_j} </math> | |||
therefore the log likelihood will be: | |||
<math display = "block"> \log(\mathcal{L}) = \sum_{j=1}^i \left(d_j\log(h_j)+(n_j-d_j)\log(1-h_j) + \log {n_j \choose d_j} \right)</math> | |||
finding the maximum of log likelihood with respect to <math> h_i</math> yields: | |||
<math display = "block"> \frac{\partial \log(\mathcal{L})}{\partial h_i} = \frac{d_i}{\widehat{h}_i}-\frac{n_i-d_i}{1-\widehat{h}_i} = 0 \Rightarrow \widehat{h}_i=\frac{d_i}{n_i} </math> | |||
where hat is used to denote maximum likelihood estimation. Given this result, we can write: | |||
<math display = "block"> \widehat S(t) = \prod\limits_{i:\ t_i\le t} \left(1 - \widehat{h}_i\right) = \prod\limits_{i:\ t_i\le t} \left(1 - \frac{d_i}{n_i}\right)</math> | |||
More generally (for continuous as well as discrete survival distributions), the Kaplan-Meier estimator may be interpreted as a nonparametric maximum likelihood estimator.<ref>{{cite book |last1=Andersen |first1=Per Kragh |last2=Borgan |first2=Ornulf |last3=Gill |first3=Richard D. |last4=Keiding |first4=Niels |title=Statistical models based on counting processes |date=1993 |publisher=Springer-Verlag |location=New York |isbn=0-387-97872-0}}</ref> | |||
==Statistical considerations== | |||
The Kaplan–Meier estimator is a [[wikipedia:statistic|statistic]], and several estimators are used to approximate its [[wikipedia:variance|variance]]. One of the most common estimators is Greenwood's formula:<ref>{{cite book |last1=Greenwood |first1=Major |date=1926 |title=A report on the natural duration of cancer |series=Issue 33 of Reports on public health and medical subjects |publisher=[[wikipedia:HMSO|HMSO]] |oclc=14713088 }}</ref> | |||
<math display = "block"> \widehat{\operatorname{Var}} \left( \widehat S(t) \right) = \widehat S(t)^2 \sum_{i:\ t_i\le t} \frac{d_i}{n_i(n_i-d_i)},</math> | |||
where <math> d_i </math> is the number of cases and <math>n_i</math> is the total number of observations, for <math>t_i < t</math>. | |||
==Nelson–Aalen estimator== | |||
The '''Nelson–Aalen estimator''' is a [[wikipedia:nonparametric statistics|non-parametric estimator]] of the [[wikipedia:hazard rate|cumulative hazard rate]] function. The [[wikipedia:estimator|estimator]] is given by | |||
<math display = "block">\hat{H}(t)=\sum_{t_i\leq t}\frac{d_i}{n_i},</math> | |||
with <math>d_i</math> the number of events up to <math>t_i</math> and <math>n_i</math> the total individuals at risk at <math>t_i</math>.<ref>{{cite web |url=http://www.statsdirect.com/help/survival_analysis/kaplan.htm|title=Kaplan–Meier Survival Estimates}}</ref> The estimate for the survival function is then | |||
<math display = "block"> | |||
\hat{S}(t) = \exp(-\hat{H}(t)) = \exp\left(-\sum_{t_i\leq t}\frac{d_i}{n_i}\right). | |||
</math> | |||
==Wikipedia Referencs== | |||
*{{cite web |url = https://en.wikipedia.org/w/index.php?title=Kaplan%E2%80%93Meier_estimator&oldid=1182709821 |title= Kaplan–Meier estimator | author = Wikipedia contributors |website= Wikipedia |publisher= Wikipedia |access-date = 14 January 2024 }} | |||
*{{cite web |url =https://en.wikipedia.org/w/index.php?title=Nelson%E2%80%93Aalen_estimator&oldid=1186970582 |title=Nelson–Aalen estimator | author = Wikipedia contributors |website= Wikipedia |publisher= Wikipedia |access-date = 14 January 2024 }} | |||
==References== |
Revision as of 03:13, 15 January 2024
Kaplan–Meier estimator
The Kaplan–Meier estimator,[1][2] also known as the product limit estimator, is a non-parametric statistic used to estimate the survival function from lifetime data.
The estimator of the survival function [math]S(t)[/math] (the probability that life is longer than [math]t[/math]) is given by:
with [math]t_i[/math] a time when at least one event happened, [math]d_i[/math] the number of events (e.g., deaths) that happened at time [math]t_i[/math], and [math] n_i[/math] the individuals known to have survived (have not yet had an event or been censored) up to time [math]t_i[/math].
Basic concepts
A plot of the Kaplan–Meier estimator is a series of declining horizontal steps which, with a large enough sample size, approaches the true survival function for that population. The value of the survival function between successive distinct sampled observations ("clicks") is assumed to be constant.
An important advantage of the Kaplan–Meier curve is that the method can take into account some types of censored data, particularly right-censoring, which occurs if a patient withdraws from a study, is lost to follow-up, or is alive without event occurrence at last follow-up. On the plot, small vertical tick-marks state individual patients whose survival times have been right-censored. When no truncation or censoring occurs, the Kaplan–Meier curve is the complement of the empirical distribution function.
In medical statistics, a typical application might involve grouping patients into categories, for instance, those with Gene A profile and those with Gene B profile. In the graph, patients with Gene B die much quicker than those with Gene A. After two years, about 80% of the Gene A patients survive, but less than half of patients with Gene B.
To generate a Kaplan–Meier estimator, at least two pieces of data are required for each patient (or each subject): the status at last observation (event occurrence or right-censored), and the time to event (or time to censoring). If the survival functions between two or more groups are to be compared, then a third piece of data is required: the group assignment of each subject.[3]
Problem definition
Let [math]\tau\ge 0[/math] be a random variable, which we think of as the time that elapses between the start of the possible exposure period, [math]t_0[/math], and the time that an event of interest takes place, [math]t_1[/math]. As indicated above, the goal is to estimate the survival function [math]S[/math] underlying [math]\tau[/math]. Recall that this function is defined as
, where [math]t=0,1,\dots[/math] is the time.
Let [math]\tau_1,\dots,\tau_n\ge 0[/math] be independent, identically distributed random variables, whose common distribution is that of [math]\tau:\tau_j[/math] is the random time when some event [math]j[/math] happened. The data available for estimating [math]S[/math] is not [math](\tau_j)_{j=1,\dots,n}[/math], but the list of pairs [math](\, ( \tilde \tau_j, c_j )\, )_{j=1,\dots,n}[/math] where for [math]j\in [n] := \{1,2,\dots,n\}[/math], [math]c_j\ge 0[/math] is a fixed, deterministic integer, the censoring time of event [math]j[/math] and [math]\tilde \tau_j = \min(\tau_j,c_j)[/math]. In particular, the information available about the timing of event [math]j[/math] is whether the event happened before the fixed time [math]c_j[/math] and if so, then the actual time of the event is also available. The challenge is to estimate [math]S(t)[/math] given this data.
Derivation of the Kaplan–Meier estimator
Here, we show two derivations of the Kaplan–Meier estimator. Both are based on rewriting the survival function in terms of what is sometimes called hazard, or mortality rates. However, before doing this it is worthwhile to consider a naive estimator.
A naive estimator
To understand the power of the Kaplan–Meier estimator, it is worthwhile to first describe a naive estimator of the survival function.
Fix [math]k\in [n]:=\{1,\dots,n\}[/math] and let [math]t\gt0[/math]. A basic argument shows that the following proposition holds:
If the censoring time [math]c_k[/math] of event [math]k[/math] exceeds [math]t[/math] ([math]c_k\ge t[/math]), then [math]\tilde \tau_k\ge t[/math] if and only if [math]\tau_k\ge t[/math].
Show ProofLet [math]k[/math] be such that [math]c_k\ge t[/math]. It follows from the above proposition that
Let [math] X_k = \mathbb{I}(\tilde \tau_k\ge t) [/math] and consider only those [math] k\in C(t) := \{ 1\le k \le n \,:\, c_k \ge t\} [/math], i.e. the events for which the outcome was not censored before time [math]t[/math]. Let [math] m(t)=|C(t)| [/math] be the number of elements in [math] C(t) [/math]. Note that the set [math] C(t) [/math] is not random and so neither is [math] m(t) [/math]. Furthermore, [math] (X_k)_{k\in C(t)} [/math] is a sequence of independent, identically distributed Bernoulli random variables with common parameter [math] S(t)=\operatorname{Prob}(\tau\ge t) [/math]. Assuming that [math] m(t)\gt0 [/math], this suggests to estimate [math]S(t)[/math] using
where the second equality follows because [math] \tilde \tau_k\ge t [/math] implies [math] c_k\ge t [/math], while the last equality is simply a change of notation.
The quality of this estimate is governed by the size of [math]m(t)[/math]. This can be problematic when [math]m(t)[/math] is small, which happens, by definition, when a lot of the events are censored. A particularly unpleasant property of this estimator, that suggests that perhaps it is not the "best" estimator, is that it ignores all the observations whose censoring time precedes [math]t[/math]. Intuitively, these observations still contain information about [math]S(t)[/math]: For example, when for many events with [math]c_k \lt t [/math], [math]\tilde \tau_k \lt c_k [/math] also holds, we can infer that events often happen early, which implies that [math]\operatorname{Prob}(\tau\le t)[/math] is large, which, through [math]S(t) = 1-\operatorname{Prob}(\tau\le t)[/math] means that [math]S(t)[/math] must be small. However, this information is ignored by this naive estimator. The question is then whether there exists an estimator that makes a better use of all the data. This is what the Kaplan–Meier estimator accomplishes. Note that the naive estimator cannot be improved when censoring does not take place; so whether an improvement is possible critically hinges upon whether censoring is in place.
The plug-in approach
By elementary calculations,
where the second to last equality used that [math]\tau[/math] is integer valued and for the last line we introduced
By a recursive expansion of the equality [math]S(t) = q(t) S(t-1)[/math], we get
Note that here [math]q(0) = 1-\operatorname{Prob}(\tau=0\mid\tau \gt -1) = 1-\operatorname{Prob}(\tau=0)[/math].
The Kaplan–Meier estimator can be seen as a "plug-in estimator" where each [math] q(s) [/math] is estimated based on the data and the estimator of [math] S(t) [/math] is obtained as a product of these estimates.
It remains to specify how [math]q(s)=1-\operatorname{Prob}(\tau=s\mid\tau\ge s)[/math] is to be estimated. By Proposition 1, for any [math]k\in [n][/math] such that [math]c_k\ge s[/math], [math]\operatorname{Prob}(\tau=s) = \operatorname{Prob}(\tilde \tau_k=s)[/math] and [math]\operatorname{Prob}(\tau\ge s) = \operatorname{Prob}(\tilde \tau_k\ge s)[/math] both hold. Hence, for any [math] k\in [n] [/math] such that [math] c_k\ge s [/math],
By a similar reasoning that lead to the construction of the naive estimator above, we arrive at the estimator
(think of estimating the numerator and denominator separately in the definition of the "hazard rate" [math]\operatorname{Prob}(\tau=s|\tau\ge s)[/math]). The Kaplan–Meier estimator is then given by
The form of the estimator stated at the beginning of the article can be obtained by some further algebra. For this, write [math]\hat q(s)=1-d(s)/n(s)[/math] where, using the actuarial science terminology, [math]d(s)=|\{1\le k\le n\,:\,\tau_k=s\}|[/math] is the number of known deaths at time [math]s[/math], while [math]n(s)=|\{1\le k \le n\,:\, \tilde \tau_k\ge s\}|[/math] is the number of those persons who are alive (and not being censored) at time [math]s-1[/math].
Note that if [math]d(s)=0[/math], [math]\hat q(s)=1[/math]. This implies that we can leave out from the product defining [math]\hat S(t)[/math] all those terms where [math]d(s)=0[/math]. Then, letting [math]0\le t_1 \lt t_2\lt\dots \lt t_m[/math] be the times [math]s[/math] when [math]d(s)\gt0[/math], [math]d_i = d(t_i)[/math] and [math]n_i = n(t_i)[/math], we arrive at the form of the Kaplan–Meier estimator given at the beginning of the article:
As opposed to the naive estimator, this estimator can be seen to use the available information more effectively: In the special case mentioned beforehand, when there are many early events recorded, the estimator will multiply many terms with a value below one and will thus take into account that the survival probability cannot be large.
Derivation as a maximum likelihood estimator
Kaplan–Meier estimator can be derived from maximum likelihood estimation of the discrete hazard function.[4][self-published source?] More specifically given [math]d_i[/math] as the number of events and [math] n_i[/math] the total individuals at risk at time [math] t_i[/math], discrete hazard rate [math] h_i[/math] can be defined as the probability of an individual with an event at time [math] t_i[/math]. Then survival rate can be defined as:
and the likelihood function for the hazard function up to time [math] t_i[/math] is:
therefore the log likelihood will be:
finding the maximum of log likelihood with respect to [math] h_i[/math] yields:
where hat is used to denote maximum likelihood estimation. Given this result, we can write:
More generally (for continuous as well as discrete survival distributions), the Kaplan-Meier estimator may be interpreted as a nonparametric maximum likelihood estimator.[5]
Statistical considerations
The Kaplan–Meier estimator is a statistic, and several estimators are used to approximate its variance. One of the most common estimators is Greenwood's formula:[6]
where [math] d_i [/math] is the number of cases and [math]n_i[/math] is the total number of observations, for [math]t_i \lt t[/math].
Nelson–Aalen estimator
The Nelson–Aalen estimator is a non-parametric estimator of the cumulative hazard rate function. The estimator is given by
with [math]d_i[/math] the number of events up to [math]t_i[/math] and [math]n_i[/math] the total individuals at risk at [math]t_i[/math].[7] The estimate for the survival function is then
Wikipedia Referencs
- Wikipedia contributors. "Kaplan–Meier estimator". Wikipedia. Wikipedia. Retrieved 14 January 2024.
- Wikipedia contributors. "Nelson–Aalen estimator". Wikipedia. Wikipedia. Retrieved 14 January 2024.
References
- "Nonparametric estimation from incomplete observations" (1958). J. Amer. Statist. Assoc. 53 (282): 457–481. doi: .
- Kaplan, E.L. in a retrospective on the seminal paper in "This week's citation classic". Current Contents 24, 14 (1983). Available from UPenn as PDF.
- "A practical guide to understanding Kaplan-Meier curves" (September 2010). Otolaryngology–Head and Neck Surgery 143 (3): 331–336. doi: . PMID 20723767.
- "STAT331 Unit 3" (PDF). Retrieved 12 May 2023.
- Andersen, Per Kragh; Borgan, Ornulf; Gill, Richard D.; Keiding, Niels (1993). Statistical models based on counting processes. New York: Springer-Verlag. ISBN 0-387-97872-0.
- Greenwood, Major (1926). A report on the natural duration of cancer. Issue 33 of Reports on public health and medical subjects. HMSO. OCLC 14713088.
- "Kaplan–Meier Survival Estimates".