weib_hazards function

Weibull hazard, cumulative hazard and inverse cumulative hazard

Weibull hazard, cumulative hazard and inverse cumulative hazard

Functions which return the hazard, cumulative hazard and inverse cumulative hazard at time t for a Weibull distribution with shape parameter λ\lambda, scale parameter θ\theta

and true hazard ratio μ\mu.

haz_weib(t, lambda, theta, mu = log(1)) chaz_weib(t, lambda, theta, mu = log(1)) inv_chaz_weib(t, lambda, theta, mu = log(1))

Arguments

  • t: time of evaluation.
  • lambda: shape parameter λ\lambda
  • theta: scale parameter θ\theta
  • mu: (optional) true excess hazard rate μ\mu.

Returns

Value of specified function at time tt.

Details

The hazard function of a Weibull distribution is given by:

h(tλ,θ,μ)=λθ(tθ)λ1e\muh(tλ,θ,μ)=λ/θ(t/θ)(λ1)exp(μ) h(t| \lambda, \theta, \mu) = \frac{\lambda}{\theta} \left(\frac{t}{\theta} \right)^{\lambda -1} e^\muh(t|\lambda, \theta, \mu) = \lambda/\theta (t/\theta)^(\lambda -1) exp(\mu)

The cumulative hazard (with true hazard ratio μ\mu) is given by:

H(tλ,θ,μ)=(tθ)λe\muH(λ,θ,μ)=(t/θ)λexp(μ) H(t| \lambda, \theta, \mu) = \left( \frac{t}{\theta} \right)^{\lambda} e^\muH(\lambda, \theta, \mu) = ( t/\theta )^{\lambda} exp(\mu)

The inverse cumulative hazard (with true hazard ratio μ\mu) by:

H1(tλ,θ,μ)=θ(teμ)1/λH(1)(tλ,θ,μ)=θ(t/eμ)1/λ H^{-1}(t| \lambda, \theta, \mu) = \theta \left( \frac{t}{e^\mu} \right)^{1/\lambda}H^(-1)(t| \lambda, \theta, \mu) = \theta (t/e^\mu)^{1/\lambda}