4.3.1.1.3.1.1. statsmodels.duration.hazard_regression.PHSurvivalTime.__init__¶
-
PHSurvivalTime.
__init__
(time, status, exog, strata=None, entry=None, offset=None)[source]¶ Represent a collection of survival times with possible stratification and left truncation.
Parameters: time : array_like
The times at which either the event (failure) occurs or the observation is censored.
status : array_like
Indicates whether the event (failure) occurs at time (status is 1), or if time is a censoring time (status is 0).
exog : array_like
The exogeneous (covariate) data matrix, cases are rows and variables are columns.
strata : array_like
Grouping variable defining the strata. If None, all observations are in a single stratum.
entry : array_like
Entry (left truncation) times. The observation is not part of the risk set for times before the entry time. If None, the entry time is treated as being zero, which gives no left truncation. The entry time must be less than or equal to time.
offset : array-like
An optional array of offsets