Dear Statalists,

I should add the risk strata (number of patients at risk) under risk axis following this command:

stset fu_morte_y, fail(r_death==2) id(id)
stcompet CumInc = ci SError = se, compet1(1)
stcompet CumInc_AA=ci if(diabetes==0), compet1(1)
stcompet CumInc_AB=ci if(diabetes==1), compet1(1)
gen ESRD_cons=CumInc_AA if r_death==2
gen ESRD_dm=CumInc_AB if r_death==2
sort fu_morte_y
twoway (scatter ESRD_cons fu_morte_y, connect(J))(scatter ESRD_dm fu_morte_y, connect(J)) if fu_morte_y<10

This is a code computing the cumulative incidence of ESKD with the competing risk of death between two populations (diabetes and not). r_death means 1=death and 2=eskd.
Is it possible to add the numer at risk under the x-axis?

Thank you very much