# Why doesn't a Cox model with time-dependent co-variates lead to pseudoreplication?

In survival analysis, if we have a time-dependent covariate, it is recommended to split data for each individual into multiple time-periods, with start and end dates for each, such that each time period has a single value for that covariate.

For example, if we were looking at data on smoking and mortality and had the following (simplistic) data:

individual    period smoking    end date      status
2             19-32             65            alive
...


it would be recoded as:

individual    start date        end date      smoking?    status
1             0                 16            no          alive
1             16                40            yes         alive

What matters for various time-to-event methods such as Cox-regression or the log-rank test is for each time at which an event occured how many patients (a) were at risk and (b) experienced an event. This is most easily seen for the log-rank test, where you look at observed events versus expected events at each time at which an event occured, but what happens with Cox regression essentially does come down to the same thing. In the example you give, it is easy to see that even after splitting the record for a patient up, no patient contributes more than once at each event time (the intervals are usually understood to be $(t_1, t_2]$ and not $[t_1, t_2]$). Another reason why the individual variable is not needed is that information is primarily in the events, so that each patient still only contributes a single event. Once you are including multiple events per patient in an analysis, it is still typical to use this counting style input, but then you need to adjust for having multiple pieces of information from the same patient (instead of pretending that you observed multiple different patients). That is typically done using a Sandwich estimate.