Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Graphing survival curve for stratified Weibull model

    Hello. I am looking for some help with graphing a survival curve for the following stratified Weibull model:

    streg i.age_q i.comorb, distribution(weibull) strata (gender)

    Of course, stcurve does not work with stratified models. For my stratified cox model I used the following code:

    stcox i.age_q i.comorb, basesurv(baseline) strata (gender)
    gen s1=baseline if gender==1
    label var s1 "female"
    gen s2=baseline if gender==0
    label var s2 "male"
    sort _t
    twoway line s1 _t, connect(stairstep) || /*
    */ line s2 _t, connect(stairstep) ||, /*
    */ legend(rows(1)) title("Stratified cox regression")/*
    */ xtitle("analysis time")

    However, this does not work for the Weibull model as the basesurv option does not apply to streg. Any suggestions would be appreciated. Thank you!

  • #2
    Catherine Woods, if you can share some portions of the underlying data using the dataex feature with your stset information and what you got so far, folks are more likely to respond. Not that I have a ready answer based on your code.

    Comment

    Working...
    X