Announcement

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

  • Merging Kaplan-Meier plots

    Hello,

    Before I begin, I should mention that I am a novice at using Stata, and I apologise if the information I provide is insufficient. My aim is to overlay multiple (as many as three) Kaplan-Meier failure functions into a single graph. I'm working on determining the timeliness of vaccination in Fiji for children up to the age of 2 years, and the vaccine I am currently working on (pentavalent) has three doses. I have the DOB and the date of vaccination for each dose per child in my dataset, and have used these to determine the analysis time (weeks) and the time to event for each dose. However, I find I need to use stset for each dose, and even then, receive three distinct graphs using sts graph for each dose. Is there any way to "merge" these three distinct graphs so that three plots may reside in one graph?

    Sincerest thanks,
    Ryan Cheong

  • #2
    I don't think there is any way to combine the graphs. I think you have to use a more roundabout path to get to your goal.

    Instead of -sts graph-, use -sts list- to get the survival functions for the three outcomes. Use the -saving()- option each time. Then -merge- the saved survival functions together and use -graph twoway connect- to plot the three survival functions against time, using the -connect(stairstep stairstep stairstep)- option so that the resulting graph looks like a typical K-M staircase.

    Comment

    Working...
    X