compute_kaplan function

Compute Kaplan-Meier statistics