statsmodels.duration.survfunc.SurvfuncRight

class statsmodels.duration.survfunc.SurvfuncRight(time, status, entry=None, title=None, freq_weights=None)[source]

Estimation and inference for a survival function.

The survival function S(t) = P(T > t) is the probability that an event time T is greater than t.

This class currently only supports right censoring.

Parameters:

time : array-like

An array of times (censoring times or event times)

status : array-like

Status at the event time, status==1 is the ‘event’ (e.g. death, failure), meaning that the event occurs at the given value in time; status==0 indicates that censoring has occured, meaning that the event occurs after the given value in time.

entry : array-like, optional An array of entry times for handling

left truncation (the subject is not in the risk set on or before the entry time)

title : string

Optional title used for plots and summary output.

freq_weights : array-like

Optional frequency weights

Attributes

surv_prob (array-like) The estimated value of the survivor function at each time point in surv_times.
surv_prob_se (array-like) The standard errors for the values in surv_prob.
surv_times (array-like) The points where the survival function changes.
n_risk (array-like) The number of subjects at risk just before each time value in surv_times.
n_events (array-like) The number of events (e.g. deaths) that occur at each point in surv_times.

Methods

plot([ax]) Plot the survival function.
quantile(p) Estimated quantile of a survival distribution.
quantile_ci(p[, alpha, method]) Returns a confidence interval for a survival quantile.
simultaneous_cb([alpha, method, transform]) Returns a simultaneous confidence band for the survival function.
summary() Return a summary of the estimated survival function.

Methods

plot([ax]) Plot the survival function.
quantile(p) Estimated quantile of a survival distribution.
quantile_ci(p[, alpha, method]) Returns a confidence interval for a survival quantile.
simultaneous_cb([alpha, method, transform]) Returns a simultaneous confidence band for the survival function.
summary() Return a summary of the estimated survival function.