# Cox-Snell residuals for Cox model with time varying coefficient

I am using the time transform feature of the coxph function in the survival package to model the effect of a time varying covariate.

fit <- coxph(Surv(start, stop, death) ~ disease + tt(disease), data=data,
tt=function(x,t,...) x*t, x=TRUE)


My question is, can Cox-Snell residuals be computed from this model to assess goodness of fit, and if so, how? I have tried to compute them like this:

 res <- data$death - fit$residual


But the problem is that the vector fit$residual is much longer than data$death, and I don't understand why. Shouldn't these vectors be the same length? How come there are more residuals than there are observations? I do not have this problem if I specify the time varying effect this way:

fit2 <- coxph(Surv(start, stop, death) ~ disease + disease:stop, data=data, x=TRUE)


Now I can compute Cox-Snell residuals as res <- data$death - fit$residual.

Because the tt(disease) means you fit the model with a time-dependent covariate disease*t, R would split one obs into several by the unique event time in the whole dataset to do that, and fit the model by viewing the several observations with adjacent time intervals as several "subjects". Then there would be much more residuals as there are more "subjects".
survsplit(Surv(..)~1, cut=data\$stop, episode = "tgroup", id = "id",