Announcement

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

  • gsem graphical postestimation for time-to-event

    Dear all,
    I've reviewed example 48g in the manual.

    The code:
    Code:
    cls
    use https://www.stata-press.com/data/r19/gsem_diet, clear
    stset dox, failure(fail) origin(time dob) enter(time doe) id(id)
    gsem (_t <- energy job height weight, family(loglogistic, failure(_d) ltruncated(_t0))), nolog
    estat eform
    Gives:
    Code:
    . estat eform
    ------------------------------------------------------------------------------
                 |     exp(b)   Std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
    _t           |
          energy |      1.072      0.063     1.19    0.23        0.956       1.202
             job |      1.010      0.030     0.35    0.73        0.953       1.071
          height |      1.011      0.005     2.28    0.02        1.002       1.020
          weight |      1.000      0.003     0.18    0.86        0.995       1.005
           _cons |   3330.551   2608.007    10.36    0.00      717.758   15454.480
    ------------------------------------------------------------------------------
    The interpretation is: Each of the time ratios is just above 1, so an increase in any of the covariates would slightly increase
    the expected time to failure (for example, having a job increases the expected time until developing a
    disease by 1.01). However, only the time ratio for height is significantly different from 1.


    I've found no examples in the documentation on post-estimation showing any graphical reporting possibilities.
    I'm having difficulties graphing the results since the outcome is _t, which I usually place on the x-axis.

    What are the possibilities using the commands margins, marginsplot, and predict?
    Kind regards

    nhb

  • #2
    I think you might be over-interpreting the example. I think it's there simply to demonstrate -gsem-'s flexibility. If you really wanted to look at these data using survival analysis, you'd use -streg- with its "graphical reporting possibilities.

    Code:
    use https://www.stata-press.com/data/r19/gsem_diet, clear
    stset dox, failure(fail) origin(time dob) enter(time doe) id(id)
    streg energy job height weight, d(loglogistic)
    streg, tratio
    help streg postestimation // for graphs,margins,  etc.

    Comment


    • #3
      Stephen Jenkins Thank you for your reply. I agree with you about the model described. I was researching the code
      Code:
      gsem (panss <- i.treat##i.week U[id]@1) (droptime <- i.treat U[id]@gamma, family(weibull, failure(infdrop))
      in https://www.stata.com/meeting/uk16/s...henko_uk16.pdf

      In this case, I don't think that post-estimation in streg is sufficient.
      Kind regards

      nhb

      Comment

      Working...
      X