Computes \(\phi_j(t) = d\Phi_j/dt\) for one phase – the derivative of
the cumulative hazard contribution returned by hzr_phase_cumhaz().
Usage
hzr_phase_hazard(
time,
t_half = 1,
nu = 1,
m = 0,
type = c("cdf", "hazard", "constant")
)Details
"cdf": \(\phi(t) = g(t)\) (density)."hazard": \(\phi(t) = h(t) = g(t)/(1-G(t))\)."constant": \(\phi(t) = 1\).
See also
hzr_decompos() for the underlying parametric family,
hzr_phase_cumhaz() for the cumulative version.
Examples
t_grid <- seq(0.1, 10, by = 0.1)
phi_early <- hzr_phase_hazard(t_grid, t_half = 2, nu = 2, m = 0,
type = "cdf")
phi_late <- hzr_phase_hazard(t_grid, t_half = 5, nu = 1, m = 0,
type = "hazard")