How to treat Survival data when death occurred is unknown but happened? Hello I am currently learning about survival analysis I am working with the survival package in R. Here is the table of survival data that I would like to analyze. It is my understanding in the survival package you need each event to be an observations. So I need to transform the data. The Interval is when they died. All the observations will have time of deaths at the End of Interval




Interval
Number_At_Risk
Censored
Deaths




0—1
555
0
82


1—2
473
8
30


2—3
435
8
27


3—4
400
7
22


4—5
371
7
26


5—6
338
28
25


6—7
285
31
20


7—8
234
32
11


8—9
191
24
14


9—10
153
27
13


10—11
113
22
5


11—12
86
23
5


12—13
58
18
5


13—14
35
9
2


14—15
24
7
3


15+
14
11
3




Source: R. L. Parker et al., JAMA, 131(2), 95—100 (1946). Copyright 1946. American Medical
Association
I have transformed the data by duplicated deaths and censored by the number they appear in a give event with the following code
duptimes.d <- df.4.9$Deaths
idd <- rep(1:nrow(df.4.9), duptimes.d)

Times.d <- df.4.9[idd,"D.Interval"]
data.d <- data.frame(Times = Times.d, Deaths = 1) #1 is a death

duptimes.c <- df.4.9$Censored
idc <-  rep(1:nrow(df.4.9), duptimes.c)

Times.c <- df.4.9[idc,"Interval"]

data.c <- data.frame(Times = Times.c, Deaths = 0) #0 is censor
df.4.9.t <- rbind(data.d, data.c)
df.4.9.t <- df.4.9.t %>% 
  tidyr::separate(Interval, c("Start", "End"), "—") %>%
  mutate(Start = 0)

So my end data looks something like this that I will eventually feed into the survival Where the  death time will be the end of the interval provided by the data.




Interval
Deaths




0 — 1
1


0 — 1
1


1 — 2
0


1 — 2
0


15+
0


15+
1




Where each row is repeated  how many time it appears in Censored and Deaths columns.
The big question
How do I represent the 15+ observations where there was a death? Do I just treat them as censored observations?

Trying to reformat these panel-type data to fit into the survival package functions in the way you propose isn't the best way to go. The functions in the survival package generally treat time as a continuous variable, with special attention needed when there are ties among event times (of which you have many). Furthermore, some of its more popular functions (e.g., coxph()) assume that any indicated events occurred at the end of the corresponding time interval.
What you have are considered "interval-censored" data: you know that certain deaths occurred within the indicated time periods, but don't know exactly when. If you simply assign all of those deaths either to the start time or the end time of the corresponding interval you will be biasing your results.
Although interval-censored data can be complicated in the most general case when each individual might have a different set of time intervals, here you have a relatively small set of intervals shared among all individuals still at risk during each interval. This situation is better handled by what is called "discrete-time" survival analysis, which effectively is a set of binomial (logistic, or complementary log-log) regressions for the time intervals. That can be done pretty easily without reformatting the pooled data into the one-line-per observation format that you are struggling with.
This web page has links to several papers on discrete-time analysis. This UCLA web page has links to some lecture notes. There is a textbook on these methods, and an R package providing the needed tools.
