Semi-parametric Timevarying Regression

Survival Regression Software

timereg R

Updated 2008. See update list for changes from last version, and the to do list for what's planned.
This page contains an R package for the fitting various survival models. These all involves aspects of time-varying effects, and the underlying theory is described in Martinussen and Scheike (to Appear). The package contains software for Aalen additive risk model, the semi-parametric additive risk model by McKeague and Sasieni, the Cox-Aalen model by Scheike and Zhang, the proportional excess hazards model by Martinussen and Scheike, and the Cox model with partly time-varying effects by Martinussen, Scheike and Skovgaard. The software estimate the parameters of all these models and do various tests to see if time-varying parameters are significantly time-varying or significant.

Also two-stage estimation Clayton-Oakes-Glidden model, and extensions that makes a regression structure possible for the variance parameters.

In addition to the time-varying models the semiparametric proportional odds model is also fitted, and a stratified version of the proportional odds model.

The package also contains goodness-of-fit procedures based on cumulative residuals.

There is now an offset option in one version of the aalen function, that can be used for excess hazards modelling in the context of relative survival. One aspect is that one can test the proportionality of the Saisieni proportional excess hazards model by cumulative martingale residuals.

There is a predict function that makes confidence bands for the additive risk model and the Cox-Aalen survival model (that includes the Cox-model).

In version 1.0-5 you can also do flexible regression modelling for modelling for competing risks data based on the IPCW direct binomial regression approach (Scheike, Zhang, Gerds, 2008). The predict function will make uniform confidence bands for predictions for the flexible models that includes the Fine-Gray model, and the non-parametric product limit estimator that is the same as our estimator in the non-regression case.

Partial least squares (PLS) and Lasso for the additive risk model. PLS with a predict function.

The code is provided under the GNU General Public License (2)
The theory is described in detail in the book by Martinussen and Scheike. The PDF manual pages and PS manual pages are here.

The package tarred and gzipped for linux/unix. Un-tar it with something like tar -zxvf timereg_1.0-1.tar.gz timereg and install with R CMD INSTALL timereg , or wihtout super-user privileges R CMD INSTALL timereg --library localdir and then inside R .libPaths("localdir"); library(timereg); .

Or install directly with something like: R CMD INSTALL timereg_1.0-2.tar.gz --library localdir

  • extended version timereg_1.1-0.tar.gz
  • R 2.6.x timereg is a Windows port. Download it and select "Install package from local zip file" from the R "Packages" menu to install.
  • For MacOS install the linux versions.
  • See CRAN for versions ported to other systems (e.g MacOS).
  • Please let me know if you have any problems installing or using timereg: email