# Survival Analysis and covariates

I have a question concerning survival analysis and how/whether one needs to incorporate time-varying covariates (at all).

Example - Time to tenure (earning PhD is time origin) and for example I want to model productivity (number of publications) as an explaining covariate. I hope it is a super easy question and I can laugh about it afterwards.

What is the difference for my analysis if I model the covariate like Version A, Version B or Version C?

I see a lot of Version A but I always thought you had to split spells, when covariates change...

Version A (covariate as cumulative sum):

ID time to tenure no. publications event
1 4 9 1

Version B (time-varying covariate, still the sum):

ID time to tenure no. publications event
1 1 3 0
1 3 4 0
1 4 9 1

Version C (the yearly output of publications):

ID time to tenure no. publications event
1 1 3 0
1 2 0 0
1 3 1 0
1 4 5 1

Thus Version A might make sense if no.publications represented the number of publications at a reference time of 0 (in your case, publications upon earning PhD). That would be a time-independent value, fixed at time = 0. The inherent assumption is that pre-PhD publication productivity drives later tenure decisions.
If the number of publications changes over time and you think that post-PhD publication record is an important determinant of tenure (as it typically is), then you are correct that you need to treat no.publications as a time-dependent variable. Otherwise you run, for example, a risk of survivorship bias in a way that would be difficult or impossible to unravel.
With respect to the choice between Version B versus Version C, that depends on what you think is the correct association of no.publications with the tenure event. Again, apply the principle that it's the current value of the variable at an event time that matters. If you think that it's the cumulated number of publications over a career, then use Version B. If you think that it's the number of publications just over the prior year, use Version C.
• @MaiMai yes, at least for the standard software implementations with which I work. With parametric models, you can write your own code to incorporate past values as arbitrary functions of time, but the standard implementations in the R survival package, for example, depend on coding the data in a way that provides covariate values (however defined) that hold specifically at event times.