statsmodels/statsmodels — pull request #1312 by kshedden (2014-01-11 14:54:45+00:00)
Title: Proportional hazards survival regression model (a.k.a. Cox model)

This is an implementation of Cox-type survival models. I put it in the sandbox along with the existing cox.py script. I'm not sure if there was a plan to develop cox.py into a mature implementation; the code I am submitting for review here is a fresh start. It is based on code I have been using for several years.

There are about 40 tests against R (coxph from the survival library), all of which pass.

This implementation handles left truncation (known in SAS as "entry times"), and stratification. Ties can be handled using either the Efron or Breslow method.

Only the parameter estimates and standard errors are provided. Various other things like concordance indices and pseudo-R^2 measures could be added at some point.

This implementation does not allow time-varying covariates. I think that should be a separate implementation. I have some working code for time-varying covariates, but it needs some cleanup and I won't get to it right away.

Comments and suggestions are welcome.