Skip to content

FJRubio67/HazReg

Repository files navigation

HazReg: Parametric Hazard-Based Regression Models for Survival Data

R package License: MIT

Overview

HazReg is an R package for fitting parametric hazard-based regression models for survival data in both the overall survival and relative (net) survival frameworks. The package is built around the General Hazard (GH) structure, which nests the most widely used hazard regression models as special cases:

Model Abbreviation Special case of GH
General Hazard GH
Proportional Hazards PH
Accelerated Failure Time AFT
Accelerated Hazards AH

Models are fitted by maximum likelihood via nlminb and optim. Users should specify initial values and verify convergence of the optimisation, as is standard practice for these routines.

Installation

# install.packages("devtools")
devtools::install_github("FJRubio67/HazReg")
library(HazReg)

Main functions

Function Framework Description
GHMLE Overall survival Fits GH, PH, AFT, and AH models
GEHMLE Relative (excess) survival Fits excess hazard versions of the above
simGH Simulates survival times from a GH structure

For full documentation: ?GHMLE, ?GEHMLE, ?simGH

Baseline hazard distributions

Both GHMLE and GEHMLE support the following parametric baseline hazards. All positive parameters are log-transformed for unconstrained optimisation.

Distribution Key GH PH AFT AH
Power Generalised Weibull PGW
Exponentiated Weibull EW
Generalised Gamma GenGamma
Gamma Gamma
Log-normal LogNormal
Log-logistic LogLogistic
Weibull Weibull

Hazard and related functions (PDF, CDF, survival) are also exported directly, e.g. ?hpgw, ?hggama.

Tutorials and examples

Related resources

Citation

If you use HazReg in your work, please cite the package and the relevant methodological papers linked in the tutorials above.

About

Parametric hazard-based regression models (R package)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages