Hello,
I am trying to plot hazard ratios overtime using stsplit.
But when I look at the graph, it looks more like HR of 17.46 is at time 0, HR of 4.2 is at time 360, HR of 1.66 at time 730, so on and so forth.
Since it is a time interval (as I used stsplit), isn't HR of 17.46 on the Y axis supposed to be somewhere in between 0 and 360? And HR of 4.2 between 360 and 720? I feel like the graph that I made does not represent the true data/analysis that I am trying to convey. What did I do wrong with the graph function? Please help!

Thank you,
NL
I am trying to plot hazard ratios overtime using stsplit.
Code:
stset PTLD_ONSET, failure(PTLD_OUTCOME==1) id(TRR_ID_CODE)
stsplit timeband, at(0 365 730 1460 2190 2920)
stcox GROUP_3#i.timeband, strata(timeband)
frame create results int time float hr
foreach t of numlist 0 365 730 1460 2190 2920 {
lincom 2.GROUP#`t'.timeband - 1.GROUP#`t'.timeband, eform
frame post results (`t') (`r(estimate)')
}
( 1) - 1b.GROUP_3#0b.timeband + 2.GROUP_3#0b.timeband = 0
------------------------------------------------------------------------------
_t | exp(b) Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
(1) | 17.46038 2.0225 24.69 0.000 13.91413 21.91046
------------------------------------------------------------------------------
( 1) - 1b.GROUP_3#365.timeband + 2.GROUP_3#365.timeband = 0
------------------------------------------------------------------------------
_t | exp(b) Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
(1) | 4.203491 .6953562 8.68 0.000 3.039494 5.813248
------------------------------------------------------------------------------
( 1) - 1b.GROUP_3#730.timeband + 2.GROUP_3#730.timeband = 0
------------------------------------------------------------------------------
_t | exp(b) Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
(1) | 1.660837 .3606681 2.34 0.019 1.085125 2.541993
------------------------------------------------------------------------------
( 1) - 1b.GROUP_3#1460.timeband + 2.GROUP_3#1460.timeband = 0
------------------------------------------------------------------------------
_t | exp(b) Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
(1) | 1.034164 .3113638 0.11 0.911 .5732071 1.865809
------------------------------------------------------------------------------
( 1) - 1b.GROUP_3#2190.timeband + 2.GROUP_3#2190.timeband = 0
------------------------------------------------------------------------------
_t | exp(b) Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
(1) | 1.560677 .5011171 1.39 0.166 .8317661 2.928363
------------------------------------------------------------------------------
( 1) - 1b.GROUP_3#2920.timeband + 2.GROUP_3#2920.timeband = 0
------------------------------------------------------------------------------
_t | exp(b) Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
(1) | 1.444856 .7681737 0.69 0.489 .5096522 4.096145
------------------------------------------------------------------------------
frame results: graph twoway line hr time, sort
Since it is a time interval (as I used stsplit), isn't HR of 17.46 on the Y axis supposed to be somewhere in between 0 and 360? And HR of 4.2 between 360 and 720? I feel like the graph that I made does not represent the true data/analysis that I am trying to convey. What did I do wrong with the graph function? Please help!
Thank you,
NL
