Announcement

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

  • Failure Rate using 'strate' at multiple exit points

    Hi Everone,

    I am stuck on a problem. I want to graph the failure rate at varying time point viz. 1,3,5 and 10 years after being at risk of a failure event in a single graph. I want to calculate the failure rate using -strate- command at multiple points e.g. at 1 year, 5 year, and 10 years after being at risk for the failure event and then graph all these rates in a single graph.

    Right now the approach I am using is using multiple -ststet- commands with exit (oneyear), exit (threeyears) and so one after the other and calculating failure rate after 1 ,3, 5, and ten years. The drawing a graph my putting individual values.



    Is there an easy way to do this?



    [CODE]
    * Example generated by -dataex-. For more info, type help dataex
    clear

    input int ster_date byte finalfail int(failuredate oneyear threeyear fiveyear tenyear)
    12918 0 20284 13283 14013 14743 16568
    . . . . . . .
    14318 0 20284 14683 15413 16143 17968

    15840 0 20284 16205 16935 17665 19490
    . . . . . . .
    13863 0 20284 14228 14958 15688 17513
    . . . . . . .
    13223 0 20284 13588 14318 15048 16873
    16116 0 20284 16481 17211 17941 19766
    14318 0 20284 14683 15413 16143 17968
    15080 0 20284 15445 16175 16905 18730
    14014 0 20284 14379 15109 15839 17664
    . . . . . .



    *****************************My Command*************************


    * Declaring the data for the survival analysis:

    stset failuredate [pw = weight], fail(finalfail==1) origin (ster_date) scale (365) exit (oneyear)


    * Calculating Failure rate at 1 year per 100 User Years

    strate, per (100)


    ************************************ Failure Rate at 3 Year

    * Declaring the data for the survival analysis:

    stset failuredate [pw = weight], fail(finalfail==1) origin (ster_date) scale (365) exit (threeyear)

    * Calculating Failure rate at 3 year per 100 User Years

    strate, per (100)




    ************************************ Failure Rate at 5 Year


    * Declaring the data for the survival analysis:

    stset failuredate [pw = weight], fail(finalfail==1) origin (ster_date) scale (365) exit (fiveyear)

    * Calculating Failure rate at 5 year per 100 User Years

    strate==1, per (100)


  • #2
    In your options to -stset- you can use, for example, exit(time ster_date + 365.24*5) to avoid having to create variables for the exit times.

    Be aware that when you write 'failure rate at 5 years' me (and many others) will think you mean the (conditional) hazard at 5 years. What you have calculated is the average rate across a five-year follow-up. If that's what you want, then I don't see an easier way to do it although I suggest you call it something different (e.g., "average rate within the first x years of follow-up" or "average rate between entry and x years"). If you actually want the conditional failure rate at certain times then that's a different analysis.

    Comment


    • #3
      Originally posted by Paul Dickman View Post
      In your options to -stset- you can use, for example, exit(time ster_date + 365.24*5) to avoid having to create variables for the exit times.

      Be aware that when you write 'failure rate at 5 years' me (and many others) will think you mean the (conditional) hazard at 5 years. What you have calculated is the average rate across a five-year follow-up. If that's what you want, then I don't see an easier way to do it although I suggest you call it something different (e.g., "average rate within the first x years of follow-up" or "average rate between entry and x years"). If you actually want the conditional failure rate at certain times then that's a different analysis.

      Dear Prof. Paul,

      Thank you very much for replying to my query and enlighten me with your knowledge. I am trying to calculate something called "Contraceptive Failure Rate or Pearl Index". Contraceptive failure: becoming pregnant unintentionally while using a method to prevent pregnancy.

      The State SVY manual state that


      "strate tabulates the rate, formed from the number of failures divided by the person-time, by different levels of one or more categorical explanatory variables specified by varlist. Confidence intervals for the rate are also given."


      The formula for Pearl index = (No. of failure x 12) x 100 / (No. of women in the study x Duration of use of method in months)

      = number of failure event/ total person-time


      Is the command -strate- , appropriate for this calculation or should I use life-table method.

      If the -strate- command alone appropriate, or do I need to use the -stsplit- command as well?





      Comment


      • #4
        number of failure event/ total person-time
        That is exactly what -strate- gives you.

        Your analytic approach works.

        You could, potentially, split your data into years and tabulate the number if failures and total person-time for each year. Based on those numbers, you could easily get a number of useful statistics including those that you are calculating (i.e.,sum the events and p-time across 5 years to get the five year estimates or sum them over 10 years to get the 10-year estimates).

        Comment

        Working...
        X