Announcement

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

  • discrete time survival analysis

    Dear Experts

    I would greatly appreciate if you could let me know how to do discrete time survival analysis with time varying covariates.
    Some part of my data set is as follows (d1-d12: are dummy variables for each time period):

    ID TIME EVENT x1 x2 x3 x4 x5
    1 1 0 1.28 0.02 0.87 1.22 0.06
    1 2 0 1.27 0.01 0.82 1.00 -0.01
    1 3 0 1.05 -0.06 0.92 0.73 0.02
    1 4 0 1.11 -0.02 0.86 0.81 0.08
    1 5 1 1.22 -0.06 0.89 0.48 0.01
    2 1 0 1.06 0.11 0.81 0.84 0.20
    2 2 0 1.06 0.08 0.88 0.69 0.14
    2 3 0 0.97 0.08 0.91 0.81 0.17
    2 4 0 1.06 0.13 0.82 0.88 0.23
    2 5 0 1.12 0.15 0.76 1.08 0.28
    2 6 0 1.60 0.26 0.55 1.31 0.37
    2 7 0 1.58 0.26 0.56 1.16 0.35
    2 8 0 1.54 0.24 0.59 1.08 0.33
    2 9 0 1.72 0.22 0.55 0.84 0.29
    2 10 0 1.72 0.21 0.53 0.79 0.29
    2 11 0 1.63 0.19 0.55 0.73 0.27
    2 12 0 2.17 0.32 0.44 0.95 0.43
    3 1 0 0.87 -0.03 0.79 0.61 0.00
    3 2 1 0.83 -0.14 0.95 0.57 -0.02


    Non-parametric methods:
    . logit event d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 x1 x2 x3 x4 x5, cluster(id) nocons
    . logit event ln(time) x1 x2 x3 x4 x5, cluster(id) nocons

    . cloglog event d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 x1 x2 x3 x4 x5, cluster(id) nocons
    . cloglog event ln(time) x1 x2 x3 x4 x5, cluster(id) nocons


    . xtset id time, yearly
    . xtlogit event x1 x2 x3 x4 x5, pa corr(exchangeable)
    . xtlogit event x1 x2 x3 x4 x5, re
    . xtlogit event x1 x2 x3 x4 x5, fe

    . xtcloglog event x1 x2 x3 x4 x5, re
    . xtcloglog event x1 x2 x3 x4 x5, pa corr(exchangeable)

    Semi-parametric method:
    . stset time, failure(event==1)
    . stcox x1 x2 x3 x4 x5, cluster(id)
    . stcox x1 x2 x3 x4 x5
    . stcox x1 x2 x3 x4 x5, shared(id)

    Parametric methods:
    . xtset id time, yearly
    . stset time, failure(event==1)
    . xtstreg x1 x2 x3 x4 x5, dist(exponential)
    . xtstreg x1 x2 x3 x4 x5, dist(loglogistic)
    . xtstreg x1 x2 x3 x4 x5, dist(lognormal)
    . xtstreg x1 x2 x3 x4 x5, dist(weibull)
    . xtstreg x1 x2 x3 x4 x5, dist(gama)

    . stset time, failure(event)
    . mestreg x1 x2 x3 x4 x5, dist(exponential)
    . mestreg x1 x2 x3 x4 x5, dist(loglogistic)
    . mestreg x1 x2 x3 x4 x5, dist(lognormal)
    . mestreg x1 x2 x3 x4 x5, dist(weibull)
    . mestreg x1 x2 x3 x4 x5, dist(gama)


    Thanks in advance.
    Best regards,
    Last edited by shahla ebrahimi; 17 Mar 2017, 06:47.

  • #2

    Semi-parametric method:
    . stset time, id(id) failure(event==1)
    . stcox x1 x2 x3 x4 x5, cluster(id)
    . stcox x1 x2 x3 x4 x5
    . stcox x1 x2 x3 x4 x5, shared(id)

    Comment


    • #3
      It is difficult to tell whether you can specify a parametric model or not, because you say nothing about the data and the sample. In principle, you can use parametric models if you know the distribution. If you are afraid of assuming a certain parametric distribution, a semi-parametric model (like Cox regression) is deemed better. Also, as you have already tried various models (I guess), you can compare the results among non-parametric, semi-parametric, and parametric models. While you will eventually choose one BEST model, you can learn a lot from other models, such as seeing if the results are robust. Above all, you will run non-parametric models to get the survival function and summary stats, anyway.

      Comment


      • #4
        Rakkoo Chung
        First and foremost, I thank you very much for your time and consideration. Then, My data set is related to companies' bankruptcy. My covariates are some financial ratios which are computed at the end of each year. Besides, the issue that a company is gone bankrupt or not, is also determined at the end of each year after financial statements is prepared.
        Could you please let me know how to determine the distribution? I know that different parametric models could be compared based on AIC but how to compare a parametric model to a non-parametric one?
        Best regards,

        Comment

        Working...
        X