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
How to create a new dataset from r(name) after a r-class command I would like to ask how to create a new dataset from r(name) after a r-class command I am analy…
Help need please for a foreach commandDear Statalists, I'm wondering if anyone could help me on this. I have a dataset containing 26 vari…
Reghdfe Definition of SingletonI am running a regression that requires a fixed effect variable, which we’ll call fe. When I manuall…
Accessing Variables from Python script in StataI am working on a project where I need to collect daily values for variables where each day is in it…
Create parent child links in panel dataHi everyone, I am working with a panel data set and want to create intergenerational linkages betwe…
Subscribe to:
Post Comments (Atom)
0 Response to Risk strata under x axis STCOMPET
Post a Comment