Announcement

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

  • Time fixed effects in Cox proportional hazards model

    Hi, I was wondering if it's possible to include year fixed effects in a Cox proportional hazards model with time-dependent covariates using an individual-year panel dataset?

  • #2
    Wani:
    what do you mean by "an individual-year panel dataset"?
    Last edited by Carlo Lazzaro; 27 Apr 2025, 11:32.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Hi Carlo, I mean that there are multiple observations across years per individual and I want to use each year/row as an interval
      Last edited by Wani Zhang; 28 Apr 2025, 15:41.

      Comment


      • #4
        Wany:
        yes, you can add -i.year- in the right hand-side of your -stcox- regression.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          If each year is the interval of time, shouldn't one use an interval-censored model (-stintcox-, for example)? Moreover, before rushing to include 'year' (an indicator of calendar time) as a covariate, checking that 'year' is not collinear with elapsed duration (or other covariates that are time dependent, by which I mean calendar time or duration time dependent)

          Comment


          • #6
            Hi Carlo and Stephen, thank you both for your responses. I have a variable that represents the number of days until the event, but the data is updated every year so I assumed I would use yearly intervals. I'm not entirely sure how to approach this.

            Comment

            Working...
            X