statsmodels.duration.survfunc.SurvfuncRight¶

class
statsmodels.duration.survfunc.
SurvfuncRight
(time, status, entry=None, title=None, freq_weights=None, exog=None, bw_factor=1.0)[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 (arraylike) – An array of times (censoring times or event times)
 status (arraylike) – 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 (arraylike, 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 (arraylike) – Optional frequency weights
 exog (arraylike) – Optional, if present used to account for violation of independent censoring.
 bw_factor (float) – Bandwidth multiplier for kernelbased estimation. Only used if exog is provided.

surv_prob
¶ The estimated value of the survivor function at each time point in surv_times.
Type: arraylike

surv_prob_se
¶ The standard errors for the values in surv_prob. Not available if exog is provided.
Type: arraylike

surv_times
¶ The points where the survival function changes.
Type: arraylike

n_risk
¶ The number of subjects at risk just before each time value in surv_times. Not available if exog is provided.
Type: arraylike

n_events
¶ The number of events (e.g. deaths) that occur at each point in surv_times. Not available if exog is provided.
Type: arraylike
Notes
If exog is None, the standard KaplanMeier estimator is used. If exog is not None, a local estimate of the marginal survival function around each point is constructed, and these are then averaged. This procedure gives an estimate of the marginal survival function that accounts for dependent censoring as long as the censoring becomes independent when conditioning on the covariates in exog. See Zeng et al. (2004) for details.
References
D. Zeng (2004). Estimating marginal survival function by adjusting for dependent censoring using many covariates. Annals of Statistics 32:4. http://arxiv.org/pdf/math/0409180.pdf
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.