# Kaplan-Meier for interval-censoring data

I would like to ask if someone encountered the problem with a specific form of interval data in survival analysis.
How to perform the preliminary analysis (for instance Kaplan-Meier estimator) of survival time when each of my observations has its own time interval?

The first five examples:

+----+------+--------+----------+
| Id | Left | Right  | Censored |
+----+------+--------+----------+
|  1 |    0 |      1 |        0 |
|  1 |    2 |     17 |        1 |
|  2 |    0 |      7 |        0 |
|  3 |    0 |      3 |        0 |
|  3 |    4 |     34 |        1 |
+----+------+--------+----------+


Left - begining of compartment
Right - end of compartment

• For variable censored, 0 = censored or 1 = censored? Commented Aug 3, 2019 at 21:09
• @user158565, this is an abortive term: 0 = censored. Thanks Commented Aug 4, 2019 at 7:30
• Then you just need to keep one record for each id. For example, keep 0 17 1 for id =1, 0 34 1 for id =3. Commented Aug 4, 2019 at 17:24

Since you talk about survival time, you'll need to compute the time interval (tInt = Right - Left) for each Id and use that new variable to obtain a Kaplan-Meier estimator.
Afterwards, if you want to do something like a Cox regression, besides the time interval tInt you may also use as one covariate either the middle time point mtp = (Left + Right) / 2 or the initial time (Left). The middle time point mtp might be a better covariate since it's usually less correlated with the time interval tInt.