Announcement

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

  • Plot Interactions in discrete-time survival models (xtcloglog specification)

    Hi,

    I need to plot an interaction effect in a discrete-time survival model (xtcloglog specification). I am currently doing it using margins command, in the following way:

    xtcloglog dv iv m c.iv#c.mv

    margins, at (iv=(min(range)max) mv=(mean-2*s.d mean+2*s.d))

    marginsplot, noci recast(line) scheme(s1mono)

    I have 2 questions regarding this approach:

    1) Would this be a correct approach for discrete-time survival models?


    2) Plots change quite significantly when reversing the iv with the mv, i.e. when I plot the following:

    xtcloglog dv iv m c.iv#c.mv

    margins, at (mv=(min(range)max) iv=(mean-2*s.d mean+2*s.d))

    marginsplot, noci recast(line) scheme(s1mono)

    I assume this is due because iv and mv differ when it comes to mean and s.d. However, I would have initially assumed them to have quite similar patterns, which is not the case in my sample. Is there a more detailed explanation of why this happens?


    Any help would be much appreciated.

    Thanks,

    Giuseppe
    Last edited by Giuseppe Criaco; 18 Nov 2014, 07:26.

  • #2
    The bigger question is: what is the outcome that is most interest in this context? Is it really the discrete hazard (which I think is assumed in your margins specification), or other things such as the median duration conditional on characteristics? Have a look at the material at http://www.iser.essex.ac.uk/survival-analysis especially Lessons 6 and 7 on discrete time survival analysis. In addition you need to think about the values at which predictors are set -- including those of time-varying predictors -- and the value of the unobserved heterogeneity ('frailty') term.

    Comment


    • #3
      Hi Stephen,

      thanks a lot for your quick answer.
      I am using a sample of firms and I am tracking their survival on a 7 years life-span.I thus have longitudinal information, on a yearly base.I would then like to plot how the interaction term affect the likelihood of failure of such firms. I am not particularly interested in median duration.
      Another more generic issue that puzzles me is why plots change when I interchange independent with moderator variable (and viceversa).

      Thanks again!

      Giuseppe

      Comment


      • #4
        I would recommend having another look at the web material I mentioned. Personally, I would forget margins at this stage, and calculated predicted outcomes (conditional hazard rates) for a firm with prespecified characteristics (noting the complications I mentioned before) using post-estimation command predict. You can then repeat this exercise, varying the characteristics. It's a version of margins, at(...), but the advantage is that one (I) would know exactly what is being calculated, and could then maybe use it to check a margins version of the calculation(s).

        Comment


        • #5
          Dear Stephen,
          I have the same question listed here. I first used the margin but after reading your documents (lesson 7) I have used the predict command. I am still not sure about it neither the interpretation of the graph. I have an interaction term in my model and also I used the xtcloglog, would you please provide more information or examples on how to use the predict command with interaction?

          Comment

          Working...
          X