Question

When considering time dependent data in survival analysis, you have multiple start-stop times for an individual subject with measurements for the covariates as each start-stop time. How does the coxph function keeps track of which subject it is associating the start and stop times along with the covariates?

The function looks as follows

coxph(Surv(start, stop, event, type) ~ X)

Your data may look as follows

subject | start   | stop   | event  | covariate |
--------+---------+--------+--------+-----------+
1       | 1       | 7      | 0      | 2         |
1       | 7       | 14     | 0      | 3         |
1       | 14      | 17     | 1      | 6         |
2       | 1       | 7      | 0      | 1         |
2       | 7       | 14     | 0      | 1         |
2       | 14      | 21     | 0      | 2         |
3       | 1       | 3      | 1      | 8         |

How can the function get away without an individual subject specifier?

Was it helpful?

Solution

My understanding is that survival analysis is not interested in individuals through time, it is looking at total counts for each time point, so the subject specifier is irrelevant. Instead, based on the counts, probabilities can be estimated that any particular subject will be alive/dead at a certain time given certain treatments.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top