0

I'm trying to simulate survival times from Weibull(or lognormal) distribution with parameters (shape,scale) including (?%) of right-censored observations.I need to obtain observations of a variable, which include some percentage of right-censored data.

user29237
  • 31
  • 2

1 Answers1

1

Your question is not sufficiently clear to be fully answerable. What I can tell you is that to generate censored data, you need to generate two pseudo-random variates: one according to the distribution you want for the data, and the second for censoring. Then you check to see if the datum or the censoring value come first. Assuming we are talking about times, the realization is the earlier time of the two, and it is censored or not depending on which it was that came first. For a more thorough treatment, see my answer here: How to simulate censored data.

gung - Reinstate Monica
  • 132,789
  • 81
  • 357
  • 650