flexsurv was written to encourage the use of flexible
distributions to account for model uncertainty in survival analysis,
initially the three-parameter generalized gamma, four-parameter
generalized F and the Royston-Parmar spline
model. However it was straightforward to modularise the design of the
code to accept any generic parametric distribution.
survreg from the The phreg and
aftreg for parametric survival modelling under a
variety of distributions and proportional hazards or accelerated
failure time parameterisations.
Other facilities for generic maximum likelihood model fitting exist,
for example fitdistr in the flexsurvreg is intended to provide typical outputs and
summaries of interest to survival analysts, particularly in medical
applications. Feature requests along these lines are welcome.
Note that if an R package provides density and probability functions
for a parametric distribution, it can then be used easily in
flexsurvreg. For instance, several ``reliability''
distributions used in industrial statistics are available in the
flexsurvreg fits parametric time-to-event (survival)
models. Several built-in parametric distributions are available. Any
user-defined parametric model can also be employed by supplying a list
with basic information about the distribution, including the density and
probability functions.Covariates are included using a linear model on a location parameter of the distribution. This usually defines an accelerated failure time or proportional hazards model, depending on the distribution and parameter.
flexsurvspline fits the flexible survival model of
Royston and Parmar (2002) in which the log cumulative hazard is
modelled as a natural cubic spline function of log time, including a
linear term for covariates. Alternative proportional odds or probit
parameterisations are available.
Output from the models can be presented as plots of the survivor, cumulative
hazard and hazard functions (plot.flexsurvreg). These are
compared against nonparametric estimates to assess goodness-of-fit.
Distribution (``dpqr'') functions for the generalized gamma and F distributions are
given in GenGamma, GenF (preferred
parameterisations) and GenGamma.orig,
GenF.orig (original parameterisations).
flexsurv also includes the standard Gompertz distribution
with unrestricted shape parameter, see Gompertz.
Cox, C. (2008). The generalized $F$ distribution: An umbrella for parametric survival analysis. Statistics in Medicine 27:4301-4312.
Cox, C., Chu, H., Schneider, M. F. and Mu�oz, A. (2007). Parametric survival analysis and taxonomy of hazard functions for the generalized gamma distribution. Statistics in Medicine 26:4252-4374