Re: [R] Survreg(), Surv() and interval-censored data

From: Thomas Lumley <tlumley_at_u.washington.edu>
Date: Thu 16 Feb 2006 - 07:58:26 EST

On Mon, 13 Feb 2006, Stephen Richards wrote:

> Can survreg() handle interval-censored data like the documentation
> says? I ask because the command:
>
> survreg(Surv(start, stop, event) ~ 1, data = heart)
>
> fails with the error message
>
> Invalid survival type
>
> yet the documentation for Surv() states:
>
> "Presently, the only methods allowing interval censored data are
> the parametric models computed by 'survreg'"
>
> Any pointers as to what I'm missing?
>

You are specifying left-truncated, right-censored data, not interval-censored. You need the type= argument, eg

> Surv(c(1,1,NA,3),c(2,NA,2,3),type="interval2")
[1] [1, 2] 1+ 2- 3

specifies interval censoring at [1,2], right-censoring at 1, left-censoring at 2, and an observed event at 3.

         -thomas



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Feb 16 08:05:08 2006

This archive was generated by hypermail 2.1.8 : Thu 16 Feb 2006 - 16:33:39 EST