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
Related Posts with Risk strata under x axis STCOMPET
Expanding data with start/end date to include all dates in betweenI have a dataset with information on individual id, signup & dropout year/month in the program I…
reshape data wide to long I am working on wide formatted data that have 11574 observations &11547 row. the repeated obser…
Control for country effect in a pooled estimationHello everybody, I have panel data with two time periods (t=2) and n regions as entities. I am cons…
categorical outcome for first occuring eventDear stalisters, I am performing an event history analysis using a multinomial model (competing ris…
using loop for saving and directoryHello, I try to use the loop for my analysis and save them and draw charts. so I receive an error se…
Subscribe to:
Post Comments (Atom)
0 Response to Risk strata under x axis STCOMPET
Post a Comment