Announcement

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

  • Kaplan-Meier Graph Problem

    Hi Everyone,
    I'm trying to create some Kaplan-Meier plots. However the problem is after st setting the panel data, when I plot on the horizontal axis instead of showing the 1-15 rounds of the time in my panel standing for (1997-2011) which should be for better analytical purposes it goes from 1 to 2011.That's why the Plots become useless. How can I fix this?Thanks in advance.
    This is the code I'm using after stsetting :
    sts graph, by (X)
    Last edited by Mona Sameni; 01 Mar 2015, 16:28.

  • #2
    Hello Mona,

    Please try the option - xlabel(1997(1)2011) - and see if that's what you want.

    Code:
    . sts graph, by(X) xlabel(1997(1)2011)
    Best,

    Marcos
    Best regards,

    Marcos

    Comment


    • #3
      Hi Marcos,thanks so much. I tried the code same problem occurs because I guess the source of the problem is in stsetting where my time variables is defined as analysis time _t: year
      This should be number of the rounds of my panel rather than the year for the purpose of Kaplan-Meier plots. However for Cox estimations I'm pretty sure the time variable should be years and not rounds.Your advice is highly appreciated.

      Comment


      • #4
        For Cox regression only the order in which events happen matter, not the actual times. This is what makes Cox regression semi-parametric. So changing the times does exactly nothing as long as you keep the order.

        However, I am pretty sure you do not want your time variable to be of the type 1997. If you say the time is 1997, then that assumes that somebody started to become at risk in year 0 and survived for 1997 years. That sounds wrong. Instead number of rounds survived sounds about right, except that you now have a discrete time survival problem rather than a continuous time survival model. If you have many waves then that is not a big deal. If you have say only 10 waves then that is something to look into. See for example (Allison 2014) for a very readable introduction.

        Paul D. Allison (2014) Event History and Survival Analysis. Thousand Oaks: Sage.
        ---------------------------------
        Maarten L. Buis
        University of Konstanz
        Department of history and sociology
        box 40
        78457 Konstanz
        Germany
        http://www.maartenbuis.nl
        ---------------------------------

        Comment


        • #5
          Hi Martin.Thanks alot. Problem solved. I just generated a new variable from 1 to 15 taking account of the rounds and stset based on that.Plots look as they should now.

          Comment

          Working...
          X