Calculates the Kaplan-Meier estimator for a given data set of study subjects and events at certain time stamps.