PHReg.predict()

statsmodels.duration.hazard_regression.PHReg.predict PHReg.predict(params, cov_params=None, endog=None, exog=None, strata=None, offset=None, pred_type='lhr') [source] Returns predicted values from the proportional hazards regression model. Parameters: params : array-like The proportional hazards model parameters. cov_params : array-like The covariance matrix of the estimated params vector, used to obtain prediction errors if pred_type=?lhr?, otherwise optional. endog : array-like Durat

PHReg.loglike()

statsmodels.duration.hazard_regression.PHReg.loglike PHReg.loglike(params) [source] Returns the log partial likelihood function evaluated at params.

PHReg.initialize()

statsmodels.duration.hazard_regression.PHReg.initialize PHReg.initialize() Initialize (possibly re-initialize) a Model instance. For instance, the design matrix of a linear model may change and some things must be recomputed.

PHReg.information()

statsmodels.duration.hazard_regression.PHReg.information PHReg.information(params) Fisher information matrix of model Returns -Hessian of loglike evaluated at params.

PHReg.hessian()

statsmodels.duration.hazard_regression.PHReg.hessian PHReg.hessian(params) [source] Returns the Hessian matrix of the log partial likelihood function evaluated at params.

PHReg.get_distribution()

statsmodels.duration.hazard_regression.PHReg.get_distribution PHReg.get_distribution(params) [source] Returns a scipy distribution object corresponding to the distribution of uncensored endog (duration) values for each case. Parameters: params : arrayh-like The model proportional hazards model parameters. Returns: A list of objects of type scipy.stats.distributions.rv_discrete : Notes The distributions are obtained from a simple discrete estimate of the survivor function that puts all

PHReg.from_formula()

statsmodels.duration.hazard_regression.PHReg.from_formula classmethod PHReg.from_formula(formula, data, status=None, entry=None, strata=None, offset=None, subset=None, ties='breslow', missing='drop', *args, **kwargs) [source] Create a proportional hazards regression model from a formula and dataframe. Parameters: formula : str or generic Formula object The formula specifying the model data : array-like The data for the model. See Notes. status : array-like The censoring status values;

PHReg.fit_regularized()

statsmodels.duration.hazard_regression.PHReg.fit_regularized PHReg.fit_regularized(method='coord_descent', maxiter=100, alpha=0.0, L1_wt=1.0, start_params=None, cnvrg_tol=1e-07, zero_tol=1e-08, **kwargs) [source] Return a regularized fit to a linear regression model. Parameters: method : : Only the coordinate descent algorithm is implemented. maxiter : integer The maximum number of iteration cycles (an iteration cycle involves running coordinate descent on all variables). alpha : scalar

PHReg.fit()

statsmodels.duration.hazard_regression.PHReg.fit PHReg.fit(groups=None, **args) [source] Fit a proportional hazards regression model. Parameters: groups : array-like Labels indicating groups of observations that may be dependent. If present, the standard errors account for this dependence. Does not affect fitted values. Returns a PHregResults instance. :

PHReg.efron_loglike()

statsmodels.duration.hazard_regression.PHReg.efron_loglike PHReg.efron_loglike(params) [source] Returns the value of the log partial likelihood function evaluated at params, using the Efron method to handle tied times.