statsmodels.duration.hazard_regression.PHReg.weighted_covariate_averages#
- PHReg.weighted_covariate_averages(params)[source]#
Returns the hazard-weighted average of covariate values for subjects who are at-risk at a particular time
- Parameters:
- params
ndarray Parameter vector
- params
- Returns:
Notes
Used to calculate the Schoenfeld residuals of the Breslow method.
Tied failure times are handled as in the Breslow method, also if the model uses
ties="efron". The Schoenfeld and the score residuals of a model withties="efron"use averages that are adjusted for the ties and not these averages.