Survival package Why does Interval Censoring have a different number at risk? Hello I am learning about survival analysis and am getting exposed to interval censoring.
I was curious why when using the survfit function from survival package that the number at risk at time 0 is 1 greater then the number of observations? Is there a theoretical reason or it it a problem with my R code?
Continuous Time
set.seed(123)
library(survival)

# Continuous Time ----
size = 10
deathtime <- seq(1, size)
death = rep(1, size)
df <- data.frame(deathtime, death)

surv.obj<- Surv(df$deathtime, df$death)

summary(survfit(surv.obj ~ 1))



Makes sense at time 1 there is 10 at risk since there is 10 observations.
Interval Time

# Interval Time ----
start <- seq(0, size - 1)
end <- seq(1,size)
death <- rep(1, size)

df.i <- data.frame(start, end, death)

surv.obj.i <- Surv(time = df.i$start,
                   time2 = df.i$end,
                   event = df.i$death,
                   type = "interval")

summary(survfit(surv.obj.i ~ 1))



Why does with interval censoring at time 0 there is a number of risk of 11? There is only 10 observations.
 A: That has to do with the Turnbull estimate of the survival curve based on the interval-censored data. Simply printing the survfit object provides the needed hint:
> survfit(surv.obj.i ~ 1)
Call: survfit(formula = surv.obj.i ~ 1)

     records  n events median 0.95LCL 0.95UCL
[1,]      10 11     11    4.5       2      NA

The function knows that there were only 10 records. But the Turnbull handling of interval-censored data must allow for the possibility of an event at either end of each of your 10 time intervals. With potential events thus starting at time = 0 through time = 10, that's counted by the software as 11 potential (limiting) event times.
For more general ways of handling interval-censored data, you might examine the documentation of the icenReg package. For a small number of time intervals shared among all individuals, discrete-time survival analysis might be preferable. See this answer to your related question for some details on discrete-time models and links to more resources.
