Skip to content
Prev 306614 / 398503 Next

Generating by inverting function

On Sep 29, 2012, at 10:23 AM, Salma Wafi wrote:

            
This looks a bit confused. 

S(t) = 1- exp( -integral( h(t)dt )
where h(t) is the instantaneous hazard. That integral is the cumulative hazard function.
We do? Seems dubious. That would seem especially unlikely if we assumed that S(t) =exp( b* CDF_normal(t))
You may want to look at the Quantile2 function in package Hmisc. It is designed to generate simulated times for varying hazard ratios when offered survival probabilities. Harrell also has a Lognorm2, a Gompertz2, and Weibull2 functions.


--
David Winsemius, MD
Alameda, CA, USA