Hello,
I am new to discrete-time survival analysis. I am trying to graph the following curves (and/0r by gender):
1) observed cumulative failure curve of the event of interest.
2) observed cumulative survival curve of the event of interest.
3) observed survival curve of the event of interest
The dataset is here:
u https://stats.idre.ucla.edu/stat/sta...mathdropout_pp, clear
keep id female period event
bys id: gen time=_N
bys period female: egen p = mean(event)
I know how to graph the observed hazard curve for the event of interest in Stata.
twoway (line p period if female==0)(line logitp period if female==1),title("Observed sample hazard functions") xtitle("Term") ytitle("hazard") legend(pos(5) ring(0) col(1) label(1 "male") label(2 "female"))
I have no idea about how to acheive my goal above.
By the way, I don't want to use life table results to graph them in Excel.
Thank you for your help!
I am new to discrete-time survival analysis. I am trying to graph the following curves (and/0r by gender):
1) observed cumulative failure curve of the event of interest.
2) observed cumulative survival curve of the event of interest.
3) observed survival curve of the event of interest
The dataset is here:
u https://stats.idre.ucla.edu/stat/sta...mathdropout_pp, clear
keep id female period event
bys id: gen time=_N
bys period female: egen p = mean(event)
I know how to graph the observed hazard curve for the event of interest in Stata.
twoway (line p period if female==0)(line logitp period if female==1),title("Observed sample hazard functions") xtitle("Term") ytitle("hazard") legend(pos(5) ring(0) col(1) label(1 "male") label(2 "female"))
I have no idea about how to acheive my goal above.
By the way, I don't want to use life table results to graph them in Excel.
Thank you for your help!
Comment