Hi,
I am doing some economic evaluation and would like to plot the KM survival curve and the survival curve from a Gompertz model on the same chart.
I have started with this:
eval_data.dta
But I would like them on the same chart. How can I do this?
Grateful for any help. Thanks in advance.
I am doing some economic evaluation and would like to plot the KM survival curve and the survival curve from a Gompertz model on the same chart.
I have started with this:
eval_data.dta
Code:
use eval_data.dta, clear
stset date, id(ID) time0(date0) origin(time date) failure(event==1)
local dbn "gom"
streg baseline_age i.sex i.treatment, dist(`dbn') //nohr
stcurve, survival ylabels(0 0.5 1) ///
xscale(range(365 1826)) xlabel(/*0 "2023" */365 "2024" 731 "2025" 1096 "2026" 1461 "2027" 1826 "2028") ///
outfile("`dbn'_values_1.dta", replace) name("`dbn'_surv_1")
sts graph, surv name("KM") outfile("km_values.dta", replace) // KM curve
Grateful for any help. Thanks in advance.

Comment