statsmodels.emplike.aft_el.emplikeAFT#

class statsmodels.emplike.aft_el.emplikeAFT(endog, exog, censors)[source]#

Class for estimating and conducting inference in an AFT model

Parameters:
endognx1 array

Response variables that are subject to random censoring

exognxk array

Matrix of covariates

censorsnx1 array

Array with entries 0 or 1. 0 indicates a response was censored.

Attributes:
nobsfloat

Number of observations

endogndarray

Endog array

exogndarray

Exogenous variable matrix

censors

Censors array but sets the max(endog) to uncensored

nvarfloat

Number of exogenous variables

uncens_nobsfloat

Number of uncensored observations

uncens_endogndarray

Uncensored response variables

uncens_exogndarray

Exogenous variables of the uncensored observations

Methods

fit()

Fits an AFT model and returns results instance

predict(params[, endog])

Return the linear predictor, params multiplied by endog

Notes

The data is immediately sorted in order of increasing endogenous variables

The last observation is assumed to be uncensored which makes estimation and inference possible.

Methods

fit()

Fits an AFT model and returns results instance

predict(params[, endog])

Return the linear predictor, params multiplied by endog