The Kaplan Meier product limit estimator is widely used in survival analysis. It is applied in the situation where each event observation records, exclusively, either an outcome, or a censoring at a single known time. The product limit estimates the percent of the population surviving after each point in time. Calculated by taking the running product of the estimate of the conditional probabilities of events occurring strictly after each point in time, taken along the event time axis.
// Running product optimized to use RUNNING_SUM instead of WINDOW_SUM
[kmpl_estimate] := PREVIOUS_VALUE(1) *
1 - SUM([event_type]) /
SUM([Number of Records]) +
TOTAL(SUM([Number of Records])) -
RUNNING_SUM(SUM([Number of Records]))
Inputs and Setup:
- requires [event_time], any number greater than or equal to 0, the time to the first event of each sample row
- requires [event_type], integer taking values 0 and 1. 0 indicates censored event, 1 indicates outcome event
Partitioning and Addressing:
- addressing along [event_time], the running product is taken along ascending time
- Censor tick marks can be added by using the Gantt chart along with dual-synchronised [event_time] axes.
- In the seminal paper the last event time could not be a censor event. This was to prevent the estimator from dropping to exactly 0 at the last event time.