Announcement

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

  • Calculating the area under a curve

    Hi everyone,

    I am trying to calculate the area under curves from this kind of graph (see below). They were obtained by survivor function graphs (sts command). Any idea how to do so?

    Click image for larger version

Name:	survival_70_03.jpg
Views:	1
Size:	57.1 KB
ID:	1675547

    Thank you very much in advance!

  • #2
    Perhaps run the corresponding -sts list- command(s) with the -saving()- option. Then use the saved life table and calculate the area using the -integ- command.

    Comment


    • #3
      Yes, Clyde's suggestion in #2 will work.

      The quantity you are estimating is often called the restricted mean survival time (rmst). I did a quick "search rmst" and there are several user-written commands that not only estimate it but also compare rmst between groups. I've only ever estimated it after fitting a flexible parametric survival model (stpm2 from SSC). That approach is very quick and easy. If you'd prefer a non-parametric approach, it looks as if one of the packages does but the estimation approach is not mentioned in the help file so you would need to read the Stata Journal paper to get full details.

      Comment


      • #4
        Thank you very much Clyde and Paul!

        Your very helpful comments enabled me to achieve what I set out to do.

        Comment

        Working...
        X