I have a step hazard function $h(t)$ (a simple function that jumps at specific times and it is constant between those jumps). Something like:

Example piecewise constant hazard function

How can I simulate survival times from this hazard function? Is there a clever way for doing so?

I was thinking of using the probability integral transform, by solving $$\exp\left[-\int_0^t h(s)ds \right] = u, $$ where $u\sim U(0,1)$, but I started wondering if there is a more efficient way for simulating these times.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.