'Calculate the Kaplan-Meier estimator of the survival function'

def fit(self):

    self.results = []
    self.ts = []
    self.censorings = []
    self.event = []
    if (self.exog == None):
        self.fitting_proc(self.data)
    else:
        groups = np.unique(self.data[:, self.exog])
        self.groups = groups
        for g in groups:
            group = self.data[(self.data[:, self.exog] == g)]
            self.fitting_proc(group)
