stgenreg: A Stata package for general parametric survival analysis
We present the Stata package stgenreg for the parametric analysis of survival data. Any user-defined hazard or log hazard function can be specified, with the model estimated using maximum likelihood utilizing numerical quadrature. Standard parametric models (for example, the Weibull proportional hazards model and generalized gamma accelerated failure time model) can be fitted; however, the real advantage of the approach is the ability to fit parametric models not available in Stata or other software. Examples will include modeling the log hazard by using fractional polynomials and spline functions, fitting complex time-dependent effects, a generalized gamma model with proportional hazards, and generalized accelerated failure time models. An extensive range of prediction tools are also described.