On Sun, Nov 2, 2008 at 3:57 PM, Therneau, Terry M., Ph.D. <[EMAIL PROTECTED]> wrote: > Brostram wrote >> The survreg function cannot fit left-censored data (correct me if I am >> wrong). > in response to my suggestion to use that routine. > > You are wrong. Try reading the help file for survreg, or the references > given there.
My apologies. However, AFAICS, there is no mentioning of this in the relevant help pages. The only place I could find this described was in the help page for 'Surv' (not refered to on the survfit page), section Details, where I also found that survreg can fit interval censored data! This is great news (to me), and I think you should describe the capabilities of survreg in its own home page. It's too important imformation to be hidden away. That said, I tried to fit left censored data with survreg, but I failed miserably. I tried > Surv(time = c(1, 2), event = c(1, 2), type = "left") Error in Surv(time = c(1, 2), event = c(1, 2), type = "left") : element 1 is empty; the part of the args list of 'length' being evaluated was: (time2) and variants thereof. Given no clue on the help page, I read the source code of Surv, and found that > Surv(time = c(1, 2), time2 = c(1, 2), type = "left") works! So, with left censored data, time2 is not a time, but a status indicator! Thanks, Göran > The survreg function does not fit left-truncated data, however. > > (As the author of the survival routines, I have a fairly good idea of what > they can do.) > > Terry Therneau > -- Göran Broström ______________________________________________ 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.