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

Thomas Lumley tlumley at u.washington.edu
Wed Feb 15 21:58:26 CET 2006


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




More information about the R-help mailing list