'Estimated quantile of a survival distribution.
Parameters
p : float
The probability point at which the quantile
is determined.
Returns the estimated quantile.'

def quantile(self, p):

    ii = np.flatnonzero((self.surv_prob < (1 - p)))
    if (len(ii) == 0):
        return np.nan
    return self.surv_times[ii[0]]
