We have a study where our participant underwent some surgery at time = 0, but at various ages. Our follow-up is based only on Medicare age-eligible people, so we have to wait until they reach the age of 65 to observe them. Then, based on Medicare data (which won't exist below the age of 65) we can narrow down the time of their event to some interval (say, somewhere between a couple days and a couple months). So the data are truncated at the age of 65 (or date they turned 65) and because we can't observe anything until they are Medicare age-eligible. And it is censored to the narrowest interval that we can determine the event happened.
I'd like to use the intcox package in R, but it seems that I can either do interval censored OR left truncated in the Surv() function.
Some code I was using to test this:
library(intcox) library(survival) n<-100 dat<-data.frame(death=rbinom(n,1,0.5),entry.age=rnorm(n,50,3),group=(1+rbinom(n,1,.6))/2) dat$left <- with(dat,entry.age+rexp(n,dat$group+0.5)) dat$right <- ifelse(dat$death,dat$left+rexp(n,dat$group+0.5),NA) coxph(Surv(entry.age,left,death,type='counting')~group,data=dat) intcox(Surv(left,right,type='interval2')~group,data=dat)
It seems that the same place I would specify left-truncation is the same place you specify the left end of the interval for IC. Does anyone know if this is possible to model, or if there are workarounds that I could use? I'm pretty sure that this is not possible in SAS, but not sure about R.