sambrilleman / simsurv

Simulate Survival Data
GNU General Public License v3.0
22 stars 8 forks source link

Switch univariate root finding to log scale #5

Closed sambrilleman closed 6 years ago

sambrilleman commented 6 years ago

The uniroot function should solve:

- H(t) - log(U) = 0

instead of:

exp(- H(t)) - U = 0

This will mean adapting the get_survival function to instead be get_negcumhaz instead, and then using log(u) instead of u.