Announcement

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

  • Setting data and perform survival analysis with panel data (time-varying covariates) and competing risks

    Dear all,
    I'm struggling to figure out how to set up my data to perform a survival analysis when I have a panel dataset with time-varying covariates and two possible types of failures.
    Also, I want my time-varying covariate to be interacting with time (ie allowing for the effect to be different at different points in time).
    My objective is to estimate how both the time-varying covariate and the passage of time itself can contribute to the likelihood of failure 1 or failure 2.
    In particular, my data looks like something like this:
    ID Quarter Is at risk Failure Time-Varying covariate
    A 2000Q1 0 0 2
    A 2000Q2 1 0 3
    A 2000Q3 1 0 4
    B 1999Q2 0 0 1
    B 1999Q3 1 0 1
    B 1999Q4 1 0 3
    B 2000Q1 1 2 5
    C 2000Q1 0 0 2
    C 2000Q2 0 0 2
    C 2000Q3 1 0 3
    C 2000Q4 1 1 4
    A firm ID can be present in different Quarters, can become at risk at a certain moment ("Is at risk"), and can experience a failure of type "1" or type "2". The firm can also experience no failures and be censored.
    My questions are:
    What is the proper way to stset this type of data?
    Which Stata command(s) should I consider to perform regressions?
    Are there online available resources that can train me in this specific situation?

    Thank you very much
Working...
X