Announcement

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

  • Setting up a cox proportional hazard model accounting for time-varying covariates

    Hi Everyone, first-time poster here.

    I'm conducting a survival analysis using a Cox proportional hazards model with several covariates (both time-varying and time-invariant variables) using individual-level mortality data with the outcome being the time to death. Many of the covariates will have a time lag so, I'd like to specify the time period of interest (e.g. event in 2010) and the corresponding covariates (e.g. if the outcome year is 2010, then the covariate of that corresponding year will be included in the analysis). The time periods will be in 2-year time blocks (2008-2009, 2010-2011, 2012-2013, 2014-2015). I plan to set up the data in a long format; however, I'm not quite sure how to set up the analysis with the specified time periods that use the corresponding covariate of that time period.

    Would appreciate any advice or help!

  • #2
    Hi, Leah.

    Welcome to Statalist!

    Have you checked Example 4 from the manual?

    https://www.stata.com/manuals/ststcox.pdf

    https://www.statalist.org/forums/for...ying-covariate

    Comment

    Working...
    X