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 hazard function. More specifically given as the number of events and the total individuals at risk at time , discrete hazard rate can be defined as the probability of an individual with an event at time . Then survival rate can be defined as: and the likelihood function for the hazard function up to time is: therefore the log likelihood will be: finding the maximum of log likelihood with respect to yields: where hat is used to denote maximum likelihood estimation. Given this result, we can write: Benefits and limitations The Kaplan–Meier estimator is one of the most frequently used methods of survival analysis. The estimate may be useful to examine recovery rates, the probability of death, and the effectiveness of treatment. It is limited in its ability to estimate survival adjusted for covariates; parametric survival models and the Cox proportional hazards model may be useful to estimate covariate-adjusted survival. 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: where is the number of cases and is the total number of observations, for . In some cases, one may wish to compare different Kaplan–Meier curves. This can be done by the log rank test, and the Cox proportional hazards test. Other statistics that may be of use with this estimator are pointwise confidence intervals, the Hall-Wellner band and the equal-precision band. Software Mathematica: the built-in function SurvivalModelFit creates survival models. SAS: The Kaplan–Meier estimator is implemented in the proc lifetest procedure. R: the Kaplan–Meier estimator is available as part of the survival package. Stata: the command sts returns the Kaplan–Meier estimator. Python: the lifelines package includes the Kaplan–Meier estimator. MATLAB: the ecdf function with the 'function','survivor' arguments can calculate or plot the Kaplan–Meier estimator. StatsDirect: The Kaplan–Meier estimator is implemented in the Survival Analysis menu. SPSS: The Kaplan–Meier estimator is implemented in the Analyze > Survival > Kaplan-Meier... menu. Julia: the Survival.jl package includes the Kaplan–Meier estimator. See also Survival Analysis Frequency of exceedance Median lethal dose Nelson–Aalen estimator References Further reading External links Estimator Actuarial science Survival analysis Reliability engineering