Hi,
I have some time-to-event data for two interventions and would like to plot the hazard ratio for two interventions over time.
For example, using the hip fracture data used by Cleves, Gould & Marchenko in their book "An Introduction to Survival Analysis Using Stata" (3rd Edition), I can graph the smoothed hazards over time for each of two groups (protect = 1 & protect = 0) as follows:
Is there a command that I could use to plot the ratio of the hazards for protect = 1 and protect = 0 over time (i.e., a plot with Hazard ratio on the y-axis and Analysis time on the x-axis)?
I have some time-to-event data for two interventions and would like to plot the hazard ratio for two interventions over time.
For example, using the hip fracture data used by Cleves, Gould & Marchenko in their book "An Introduction to Survival Analysis Using Stata" (3rd Edition), I can graph the smoothed hazards over time for each of two groups (protect = 1 & protect = 0) as follows:
Code:
use http://www.stata-press.com/data/cggm3/hip2, clear sts graph, hazard by (protect)
Comment