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)
0 Response to Failure Rate using 'strate' at multiple exit points
Post a Comment