PSHREG: a SAS macro for proportional and nonproportional subdistribution hazards regression

Comput Methods Programs Biomed. 2015 Feb;118(2):218-33. doi: 10.1016/j.cmpb.2014.11.009. Epub 2014 Dec 3.


We present a new SAS macro %pshreg that can be used to fit a proportional subdistribution hazards model for survival data subject to competing risks. Our macro first modifies the input data set appropriately and then applies SAS's standard Cox regression procedure, PROC PHREG, using weights and counting-process style of specifying survival times to the modified data set. The modified data set can also be used to estimate cumulative incidence curves for the event of interest. The application of PROC PHREG has several advantages, e.g., it directly enables the user to apply the Firth correction, which has been proposed as a solution to the problem of undefined (infinite) maximum likelihood estimates in Cox regression, frequently encountered in small sample analyses. Deviation from proportional subdistribution hazards can be detected by both inspecting Schoenfeld-type residuals and testing correlation of these residuals with time, or by including interactions of covariates with functions of time. We illustrate application of these extended methods for competing risk regression using our macro, which is freely available at:, by means of analysis of a real chronic kidney disease study. We discuss differences in features and capabilities of %pshreg and the recent (January 2014) SAS PROC PHREG implementation of proportional subdistribution hazards modelling.

Keywords: Competing risks; Cumulative incidence; Regression analysis; SAS software; Subdistribution hazard ratio; Survival analysis.

Publication types

  • Research Support, Non-U.S. Gov't

MeSH terms

  • Humans
  • Likelihood Functions
  • Models, Theoretical
  • Proportional Hazards Models*
  • Risk Assessment