Hi Listers,
I am running some survival analysis using stpm2 as I also plan to estimate relative survival. I am comparing survival across 2 groups so myexposure is disease status (yes/no). I also want to adjust my model for age, which I categorised into 6 groups. Both age and disease status are time-varying.
I ideally would like to be able to plot survival across the 2 groups to observe any difference and I use the meansurv option to average across age group.
The model runs fine and produces sensible hazard ratios; however, the plot is blank as the estimate survival rate is blank
stpm2 BE_all agec2 agec3 agec4 agec5 agec6 , scale(hazard) df(4) eform tvc(BE_all agec2 agec3 agec4 agec5) dftvc(2)
predict s1 , meansurv at(BE_all 0) timevar(_t)
predict s2 , meansurv at(BE_all 1) timevar(_t)
twoway (line s1 _t, sort) (line s2 _t, sort)
Can anyone suggest what could be going wrong?
Thank you
Laura
I am running some survival analysis using stpm2 as I also plan to estimate relative survival. I am comparing survival across 2 groups so myexposure is disease status (yes/no). I also want to adjust my model for age, which I categorised into 6 groups. Both age and disease status are time-varying.
I ideally would like to be able to plot survival across the 2 groups to observe any difference and I use the meansurv option to average across age group.
The model runs fine and produces sensible hazard ratios; however, the plot is blank as the estimate survival rate is blank
stpm2 BE_all agec2 agec3 agec4 agec5 agec6 , scale(hazard) df(4) eform tvc(BE_all agec2 agec3 agec4 agec5) dftvc(2)
predict s1 , meansurv at(BE_all 0) timevar(_t)
predict s2 , meansurv at(BE_all 1) timevar(_t)
twoway (line s1 _t, sort) (line s2 _t, sort)
Can anyone suggest what could be going wrong?
Thank you
Laura
Comment