Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 73253

How can I overlay Weibull survival curves and Kaplan-Meier curves?

$
0
0
Dear Statalist users,

I am trying to plot a Weibull survival curve together with a Kaplan Meier curve but I have not been able to find a solution.

The plot I would like to produce would be something similar to what stcoxkm does.

I have been trying to use the addplot option, without success.

Code:
sts graph, by(groupvar)
streg groupvar var1 var2 var3 var4 var5, distribution(weibull)  
stcurve, survival at1(groupvar=1) at2(groupvar=2) ylabels(0 0.25 0.5 0.75 1)
I would like to put both graphs together.

Any suggestions? Thank you in advance.





Viewing all articles
Browse latest Browse all 73253

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>