Hazard and cumulative hazard functions for distributions which are built into flexsurv, and whose distribution functions are in base R.
hexp(x, rate = 1, log = FALSE)
Hexp(x, rate = 1, log = FALSE)
hgamma(x, shape, rate = 1, log = FALSE)
Hgamma(x, shape, rate = 1, log = FALSE)
hlnorm(x, meanlog = 0, sdlog = 1, log = FALSE)
Hlnorm(x, meanlog = 0, sdlog = 1, log = FALSE)
hweibull(x, shape, scale = 1, log = FALSE)
Hweibull(x, shape, scale = 1, log = FALSE)
Vector of quantiles
Rate parameter (exponential and gamma)
Compute log hazard or log cumulative hazard
Shape parameter (Weibull and gamma)
Mean on the log scale (log normal)
Standard deviation on the log scale (log normal)
Scale parameter (Weibull)
Hazard (functions beginning 'h') or cumulative hazard (functions beginning 'H').
For the exponential and the Weibull these are available analytically, and so are programmed here in numerically stable and efficient forms.
For the gamma and log-normal, these are simply computed as minus the log of the survivor function (cumulative hazard) or the ratio of the density and survivor function (hazard), so are not expected to be robust to extreme values or quick to compute.