Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Time-varying coefficients in Cox model

    Dear Statalist,

    I want to calculate the time-varying coefficients using Cox model. For example, I am investigating the association between smoking at baseline (yes/no) and the risk of stroke. I would like to calculate the hazard ratios during different follow-up intervals (i.e. <10, 10-20, and >20 years).

    Question 1: I know I can use the tvc and texp option in stcox to calculate time-varying coefficients for two stratified periods using texp(_t>10) . But for three (or more) stratified intervals (e.g. <10, 10-20, and >20 years), can I still use the texp option? if yes, how should I specify the expression in the texp?

    Question 2: Or do I need to use the stsplit command? My thought is to split the follow-up time into three intervals: < 10, 10-20 and >20 years, and then fit Cox model separately for each interval. Also, if I want to test if the hazard ratios are the same over the three intervals, can I include an interaction term between smoking and group of intervals in Cox model?

    Question 3: I spot many papers in the top journals state "the Proportional Hazard assumption is not violated" but at the same time, they present hazard ratios at stratified follow-up intervals. Isn't this a bit contradictive? If the PH assumption holds, the hazard ration should be constant across the whole follow-up period. What is the possible rationale for stating "the Proportional Hazard assumption is not violated" but also presenting hazard ratios at different follow-up intervals?

    Thank you very much.

  • #2
    I'll address your questions in reverse order.

    Your understanding in number 3 is correct. I can only assume they are referring to variables where proportional hazards were assumed.

    I would recommend the stsplit approach. Yes, you can include an interaction between smoking and timeband. I would actually recommend this approach in general. Let's say you are adjusting for potential confounders age, sex, and education. You could fit the following model:

    Code:
    stset ...
    stsplit timeband, at(0 10 20 999)
    stcox i.smoke##i.timeband i.agegrp i.sex i.edu
    In this model you are assuming PH for age, sex, and education, but not for smoking. if you fit stratified models then you are effectively assuming interactions between timeband and each of these three. It may well be that the effects of the confounders are non-proportional and this is the most appropriate model. However, it may be that the effects of one or more of these are proportional.

    I'll let someone else answer if it's possible to use texp(). Even if it's possible, I would recommend the stsplit approach.

    Comment


    • #3
      Thanks for the explanation Dr Dickman.
      Last edited by Jeff He; 10 Jun 2020, 14:00.

      Comment


      • #4
        Dr, Dickman, thank you for a simple and very useful command.
        How would you graph survival by smoking categories (dichotomous would be fine) at the different time intervals as described in the cox model you proposed? would appreciate your answer.

        Comment

        Working...
        X