Announcement

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

  • How to overlay survival curve of the source population

    Hi Everyone,

    I am working on a research project evaluating efficacy of a drug. I have KM survival curve for the study population. I am trying to overlay the survival curve for the source population on the same image. I cant find such option in Stata survival package. Can any of the members help me. I thank you for your time and consideration.

    Sincerely,
    Mike

  • #2
    When you say are trying to overlay the curve, you imply that you have a figure. In that case, I suggest that you digitize the figure and read the digitized points into Stata. In OS X I do this with an application called GraphClick, but I'm sure you can find similar applications for any OS.
    Steve Samuels
    Statistical Consulting
    [email protected]

    Stata 14.2

    Comment


    • #3
      Hello Steve and Statalist members,

      Thanks for your time reviewing my post. Let me clarify my question. Sometimes, in your study(and in your manuscript), it is better to depict the "Expected Survival" from life tables and actual survival of the study population.

      Can you please look at the following link

      http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3481737/

      OR

      http://www.ncbi.nlm.nih.gov/pmc/arti...ijph-40-74.pdf


      This article is free to view. Please look at the figures 2, 3 and 4 on page 78. The idea is to draw expected survival from the lifetables and actual survival from your data and depict in the same graph. Can any of the statalist members help me draw this in stata. Thanks again for your time.

      Sincerely
      Mike

      Comment


      • #4
        Once you have the observed and expected survival in the same dataset then Stata's graphics commands will do the rest. The -strs- command is one way of doing this (disclaimer: I am a co-author). It will calculate actuarial estimates of observed and expected survival for your cohort and save them in a Stata dataset for you to plot. See http://www.pauldickman.com/rsmodel/stata_colon/.

        To use -strs-, you'll need a file of age-specific background rates for your population; you can get these from mortality.org if you don't already have them. I can send you code for converting the file from mortality.org into the format required by -strs-.

        Another alternative would be to use -stpm2- (SSC); there you'll only need to merge in the population rate at the end of follow-up. See Chapter 8 in the book by Royston & Lambert. That chapter also describes how to use -strs-. Although I'm confident -stpm2- is a possibility, I've never actually seen it used to estimate expected survival curves. However, since it can estimate both observed survival and relative survival then the ratio of those will be the expected survival.
        Last edited by Paul Dickman; 10 Apr 2014, 03:32.

        Comment


        • #5
          Here's some code showing how to do this in -strs- using the sample data distributed with -strs-. popmort.dta is the file containing the general population rates, stratified by the varieables specified in mergeby().

          Code:
          use melanoma, clear
          keep if stage==1 /* restrict to localised */
          
          stset surv_mm, fail(status==1 2) id(id) scale(12)
          
          strs using popmort, br(0(0.5)10) mergeby(_year sex _age) ///
              by(sex agegrp) notables save(replace)
          
          use grouped if sex==1 & agegrp==3, clear    
              
          twoway (line cp end, lw(medthick)) ///
          (line cp_e2 end, lw(medthick)), ///
          yti("Survival") ///
          ylabel(0(0.2)1, format(%3.1f)) ///
          xti("Years from diagnosis") xla(0(1)10) ///
          legend(order(1 "Observed" 2 "Expected") ring(0) pos(7) col(1))
          Here's the resulting graph.


          -strs- saves the estimates at the end of each and every life table interval. You'll want to add some observations with the values of the survival curves at time zero (i.e., S(0)=1) to make the graphs look nice. Look in the help to see how to model excess mortality if that interests you.
          Attached Files

          Comment


          • #6
            I can't really improve on Paul's detailed solution. However if you already able to plot the population curve, then you can use the addplot() option of stcurve to add that plot to the KM curve. Note that you will have to rename the time variable for the pop. curve to _t.
            Steve Samuels
            Statistical Consulting
            [email protected]

            Stata 14.2

            Comment


            • #7
              Dear Paul Dickman and Steve Samuels,

              Thank you very much for your help and guidance.

              Paul Dickman:
              --------------------
              1)I was able to download data from mortality .org. Can you please send me the code to convert it to a format needed for the strs command. My e-mail id is: [email protected]

              2)I read your Stata Journal article "Estimating and modelling relative survival". Its quite interesting and I am learning it. Do you have any documents / presentations etc that I can read to improve understanding of this topic.

              3)Do you conduct any courses in USA or have online courses? ?I would like to take them.

              Steve Samuels:
              ---------------------
              I am learning survival analysis and do not have good handle on it. Could you give any sample code to use the add plot option to the code provided by Paul Dickman, if you have few minutes please. Thank you.


              Lastly, I found another stata user written program "stexpect" by "Vincenzo Coviello". Does anyone know about this program and differences from the strs command.


              Thank you very much for your time.

              Yours sincerely ,
              Mike

              Comment


              • #8
                My advice on using addplot() was predicated on your having the population curve data already at hand. I recommended it as an option to stcurve, something you must have overlooked. You don't need stcurve to compute the KM estimate because strs will do it for you. For learning survival analysis, I recommend the book by Cleves et al. See also the learning materials on Stephen Jenkins's web page https://www.iser.essex.ac.uk/resourc...sis-with-stata.

                Reference: Cleves, M. A., W. W. Gould, R. G. Gutierrez, and Y. V. Marchenko. 2010. An Introduction to Survival Analysis
                Using Stata. 3rd ed. College Station, TX: Stata Press.

                I cannot speak for Paul, but I would point out the Statalist FAQ:

                15. Asking for private replies

                Please do not request private replies unless you are posting about employment or consultancy opportunities. Statalist is based on replying to the forum, not personally to the poster, with the ideal that postings are of interest to many.
                Steve Samuels
                Statistical Consulting
                [email protected]

                Stata 14.2

                Comment


                • #9
                  Hi ,

                  Steve Samuels: Thank you very much for the advice.

                  I apologize to the Statalist as I overlooked this FAQ. Thank you for reminding.

                  Paul Dickman: Can you please post the code for converting the mortality data to a format needed for the strs command in statalist.

                  Thank you again for your time.

                  Sincerely,
                  Mike

                  Comment


                  • #10
                    You've apparently made no effort to figure out the import yourself. See how far you can get, and, if you have problems, come back to the forum with the code and results so far.
                    Steve Samuels
                    Statistical Consulting
                    [email protected]

                    Stata 14.2

                    Comment


                    • #11
                      Just to note that there is nothing new about the etiquette on private replies. That section echoes materials present in the Statalist FAQ for some years now -- at a wild guess before Michael Stewart become active on Statalist.

                      Michael: I have to suggest gently that you are asking a lot here and of lots of people. In practice, that will just rebound on you. People are all too likely just to shrug their shoulders and get back to their own work. The forum as a whole works best with specific questions that can be answered quickly.
                      Last edited by Nick Cox; 11 Apr 2014, 10:01.

                      Comment


                      • #12
                        Thank you for the feed back.I will listen to your advice.
                        Mike

                        Comment


                        • #13
                          Mea Culpa. I'm new to Statalist and suggested in my initial post that I could send the code to Michael if he needed to take that route.

                          Attached is a PDF file containing a detailed description of how to get data out of HMD into a format suitable for strs.

                          stexpect is written by Enzo Coviello, who is also an author of strs. It has a good help file, that will give you a clear picture if what it can do. As the name suggests, it estimates expected survival. strs also estimates expected survival but also does much more.

                          Regarding your other questions MIchael, Paul Lambert and I teach a course each summer in Italy. See http://cansurv.net/. The PDF I posted is one of the exercises from the course. We also teach in North America (when invited) but have no plans for courses there in the future. There are also courses held by others, but I'll leave you to find them (hint: they are often associated with conferences organised by IACR or NAACCR).
                          Attached Files

                          Comment

                          Working...
                          X