Turnbull#

class relife.Turnbull(tol=0.0001, lowmem=False)[source]#

Turnbull estimator

Methods

fit

Compute the non-parametric estimations with respect to lifetime data.

sf

Survival function.

Attributes

plot

estimates

fit(time, event=None, entry=None, departure=None, inplace=False)[source]#

Compute the non-parametric estimations with respect to lifetime data.

Parameters:
timendarray (1d or 2d)

Observed lifetime values.

eventndarray of boolean values (1d), default is None

Boolean indicators tagging lifetime values as right censored or complete.

entryndarray of float (1d), default is None

Left truncations applied to lifetime values.

departurendarray of float (1d), default is None

Right truncations applied to lifetime values.

inplaceboolean, default is True

If true, estimations are stored in the object

sf(time)[source]#

Survival function.

Parameters:
timenp.ndarray of shape (n, )

The times at which to estimate the survival function.

Returns:
np.ndarray of shape (n, )

The estimated survival probabilities at each time.