relife.data.LifetimeData
relife.data.LifetimeData¶
- class relife.data.LifetimeData(time: numpy.ndarray, event: Optional[numpy.ndarray] = None, entry: Optional[numpy.ndarray] = None, args: Tuple[numpy.ndarray] = ())[source]¶
Bases:
object
Lifetime data.
Dataclass of lifetime data required by the maximum likelihood estimation.
Methods
Converts the dataclass attributes as a tuple.
Attributes
Extra arguments required by the lifetime model.
Age of assets at the beginning of the observation period (left truncation), by default None.
Type of event, by default None.
Age of the assets.
- time: numpy.ndarray¶
Age of the assets.
- event: numpy.ndarray = None¶
Type of event, by default None.
- entry: numpy.ndarray = None¶
Age of assets at the beginning of the observation period (left truncation), by default None.
- args: Tuple[numpy.ndarray] = ()¶
Extra arguments required by the lifetime model.
- class DataByEvent(D: numpy.ndarray, D_RC: numpy.ndarray, LC: numpy.ndarray, LT: numpy.ndarray)[source]¶
Bases:
tuple
Group data by type of event.
Create new instance of DataByEvent(D, D_RC, LC, LT)
- D: numpy.ndarray¶
observed event.
- D_RC: numpy.ndarray¶
union of observed events and right-censored data.
- LC: numpy.ndarray¶
left-censored data.
- LT: numpy.ndarray¶
left-truncated data.
- __add__(value, /)¶
Return self+value.
- __mul__(value, /)¶
Return self*value.
- count(value, /)¶
Return number of occurrences of value.
- index(value, start=0, stop=9223372036854775807, /)¶
Return first index of value.
Raises ValueError if the value is not present.