I have 15 years of data of patients (2001-2015). T0 differs between them, i.e. the starting year for the survival period is strongly heterogenous. I want to model their survival rate, i.e. what is the probability that they survive after T0 each year? More so, I want to see how the survival rate differs by one or more characteristics of the patient. What would be the best way to model and estimate this?

My first option would be a survival function/hazard function. However, I am uncertain how to deal with (1) differing starting periods, i.e. T0 could be 2004 for one patient, 2012 for another, (2) different right-censoring times, i.e. if T0 is 2012, I only have 3 years of data to observe death compared to 12 years if T0 is 2003 and (3) varying probability rates dependent on a patient characteristics, which I am unsure how to incorporate and even if it is feasible.

My second option which looks more feasible in my opinion is a logit model where the dependent variable is death in a certain year or not, and the independent variable interacts time after T0 with the patient characteristic I am interested in. But if this is a valid option, I am not sure why I would even consider a survival or hazard function.


1 Answer 1


A simple way to proceed with issue (1) in a survival model is to include the actual year of T0 as a covariate in the model, ideally fit flexibly with a spline.

Issue (2) of right censoring is inherently incorporated into a survival model. Yes, you might have more uncensored data at longer times for patients with earlier T0 years, but that's OK. Mostly, that just means that estimates of baseline hazards at long times after T0 won't be as precise as those at early times. But with a standard Cox proportional hazards model, the precision of coefficient estimates has mostly to do with the total number of events, not their distribution in time. (Actual time isn't explicitly included in a Cox model, except for the ordering of events in time.)

Patient characteristics (issue 3) are readily incorporated into a survival model. You could include interactions of patient characteristics with the T0 year in the model, if you think that the association of a patient characteristic with outcome changed over calendar time.

Having "the independent variable [interact] time after T0 with the patient characteristic I am interested in" sounds like having a time-varying regression coefficient for that patient characteristic in a survival model. See the R time dependence vignette. That might ultimately be necessary, but it's not usually the way to start. The initial assumption is typically that a covariate has a particular association with the extra hazard of an event that is constant over time, even as the baseline hazard might change over time.

Your proposed set of logistic regressions year by year is a type of discrete-time survival model. If you have survival values in continuous time, a standard survival model is typically more informative as it keeps more detail about individual survival times.

  • $\begingroup$ Thanks a lot for your comment. It's very useful. I had a follow-up question. The survival values are in discrete times; i.e. I know the year the hazard occurred but not the exact day. Is there any benefit using a survival model compared to a logistic regression in this case? Thanks a lot. $\endgroup$
    – OhHiClark
    Commented Feb 23, 2023 at 9:29
  • $\begingroup$ @OhHiClark iA discrete-time survival model is a set of binary regressions, one for each time period. Analysis for each time period is restricted to those at risk during that period, which handles censoring. Setting up such a set of logistic regressions is thus a form of survival analysis. If you do that, a complementary log-log link better matches a Cox survival model than does a logit link. With discrete time, such sets of binomial regressions are preferred to Cox or other models that assume continuous time. $\endgroup$
    – EdM
    Commented Feb 23, 2023 at 19:35
  • $\begingroup$ Thanks a lot for your comments, I read through your links and have a much better understanding now! $\endgroup$
    – OhHiClark
    Commented Feb 28, 2023 at 8:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.