0

i have a problem creating my survival objects in R. I want to model the survival from suscription customers (monthly data), but for creating the survival objects i need to incorpore both types of censoring:

  • the classic right censoring: some customers entered in the observation periods and haven't unsubscribe yet ("death event")

  • left truncation and right censoring: other customers entered BEFORE the observation periods but unknown when, because there isn't history tables from before

Of course i have event cases (unsubscribed). But the problem for me is how to generate the both type survival objects in the same data set for then do the modeling. I think that not considering the "truncated" situation will bias and subestimate the long-time that some customers had stayed, so i don't wanna discard these cases.

Thus, i know the start time for those who have entered in the observation periods. But for those who entered before, i just have the period '0' as their start time, not the real ones (unknowns).

So far i've tried this codes:

1) survobj <- Surv(TIME, EVENT)
## i loose information of the truncated ones.

2) survobj <- Surv(ifelse(T0==0,NA,T0), T1, EVENT) 
## will create "interval-censored" objects, not my case

3) survobj <- Surv(T0, data$T1, EVENT, type='counting')  
## all objects will be "left truncated", not just the T0=0

Thanks in advance for any help.

1 Answers1

0

One way to incorporate both left and right censoring in the duration is to create a Surv object with type = interval2. As the survival documentation says:

[...] think of each observation as a time interval with (-infinity, t) for left censored, (t, infinity) for right censored, (t,t) for exact and (t1, t2) for an interval. This is the approach used for type = interval2. Infinite values can be represented either by actual infinity (Inf) or NA.

Hence, you need to assign the known durations in a vector for time (where left censoring cases will be NA) and in another one for time2 (where right censoring cases will be NA).

A similar issue is discussed here.

Thiago
  • 121
  • 1
  • 10