Feel free to take it and use it: formal details in the file COPYING
Version 1.0: rewritten using the noweb literate programming system. Added lots of documentation and examples. Now includes the model formula system
Version 0.6: bug fix: corrected loglikelihood computations with ties. Added some more graphical diagnostics.
Version 0.5.
This fits the stratified Cox regression model to data with right censoring and optional left truncation. Both the Efron and Breslow (Peto) adjustments for ties are available. In addition to time-dependence in step-function form which can be done with truncation/censoring there is a facility for arbitrary continuous time-dependence (which is slow). Plots of the baseline survival and hazard functions and of the scaled Schoenfeld residuals are available, as are tests of the proportional hazards assumption based on (scaled) Schoenfeld residuals (Grambsch and Therneau, Biometrika, 1994). Agnostic (model-robust) variance estimators and martingale and score residuals are available for the basic models but not for arbitrary continuous time-dependence.
Some testing has been done, against S-PLUS and SPIDA.
There is a function to compute score tests for a Cox model. In untied data this is equivalent to the logrank test and so gives stratified, k-sample logrank tests allowing left truncation and allowing tests for linear trend. In tied data it is slightly conservative.
The fitting procedure runs significantly faster when compiled, particularly with arbitrary time-dependence..
Alternatively, you can get the prebuilt version (prebuilt.tar.gz) or just the PostScript documentation(463k) or PDF documentation(774k). As you can see, generating the documentation yourself saves much bandwidth.
Some examples of plots produced from the Mayo PBC data with this code and de Leeuw & Udina's gnuplot interface:
Fairly likely Weighted logrank tests, logrank supremum tests; Weighted Cox regression; Lin & YIng's additive model
Maybe sometime Exact partial likelihood for ties; Aalen's additive hazard model; frailty models.