I'm using survreg function in R and

survreg(Surv(time,status) ~ variables, rain,dist="lognormal")

gives me Invalid survival times for this distribution. The name of variable is indeed time and it doesn't contain negative values.


1 Answer 1


The survreg function in R does not allow time = 0. This is because for several of the distributions, including the lognormal distribution, having events occur at time = 0 will result in an undefined estimator.

You can think that having time = 0 for a lognormal would be similar to having y = -Inf for a normal distribution.

  • $\begingroup$ Thanks for your answer. I have a lot of zeros in my data. Does this mean that I should remove zeros (or change them to a very small value like 0.00001) or I can use a different distribution? $\endgroup$
    – Erin
    Oct 10, 2015 at 20:45
  • 1
    $\begingroup$ That's a little tricky. The reason for this is it will have a large impact if you switch 0's for 0.1 or 0.000001. To properly answer your question, it helps to know why you have some many zeros. $\endgroup$
    – Cliff AB
    Oct 10, 2015 at 22:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.