Hello,
I am trying to generate random survival times by inverting the function,  S(t)= 
exp(b*F(t)), where b is constant and F(t) is some cumulative distribution 
function, let say that F(t) is cdf of normal distribution or any others 
distributions.
 
as we know that S(t) has uniform distribution on  (0,1) so we can write that
U= exp(b*F(t)), where U is uniform (0,1). Now to generat the time t, we do 
log(U)= b* F(t)
(log(U))/ b = F(t) and then  t = F((log(U))/b)^(-1).
 
My Question  is how we can get the inverse function for the cumulative 
distribution F(t) in R?. Is there any package in R can help to invert some 
function especially if this function is pdf or cdf?.
 
Thanks in advance.
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to