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
command kpss is unrecognisedHello I have trying to test for stationarity using Kwiatkowski–Phillips–Schmidt–Shin test. But the …
how to deal with two datasetsHi! I have a dataset with information on applicants to all job vacancies in an organization, for ea…
Extract values of TN, FP, TP and FN stataDear Stata exper, Wonder how to extract values of TN, FP, TP and FN into seperate variables in stata…
Probit model explanationI have a dataset that contains information on applications to any job vacancy in an organization. I …
WHO Anthro Macro files error message in calculating anthropometric z scoresDear All, I tried using WHO Anthro files (from https://www.who.int/childgrowth/software/en/) with S…
Subscribe to:
Post Comments (Atom)
0 Response to Risk strata under x axis STCOMPET
Post a Comment