rsurvival-analysishazard

Determine Median Residual Lifetime of Lognormal Distribution


Stefan Gelissen provides and excellent overview on how to determine median residual lifetime of a lognormal distribution in his blog here

However, when running his code, I stumbled upon this line

(mdrlhat <- uniroot(mdrl, c(0, 1e+9), t=t, Xmu=Xmu, Xsigma=Xsigma)$root)

where Stefan uses a hard coded interval of c(0, 1e+9), which works fine for the example data set from Meeker and Escobar (1998).

However, it is unclear to me how this interval should be determined in another case using different data.

Can anyone help? Thank you.


Solution

  • The lower bound of the interval c(0, 1e+9) can not be lower than "zero" and the upper bound should be a reasonably large number, which is the case for 1e+9. Theoretically, you could even chose an even larger number. However, there is no exact way of determining the upper-bound.